html – 两个内联块和块元素之间的垂直空间
发布时间:2020-12-14 19:41:17 所属栏目:资源 来源:网络整理
导读:.rectangle { width: 420px; height: 143px; color: #fff; background: rgba(0,0.7); padding: 20px 0px 20px 10px; position: relative; display: inline-block; vertical-align: top;}.triangle { width: 0; height: 0; border-top: 92px solid transparen
.rectangle { width: 420px; height: 143px; color: #fff; background: rgba(0,0.7); padding: 20px 0px 20px 10px; position: relative; display: inline-block; vertical-align: top; } .triangle { width: 0; height: 0; border-top: 92px solid transparent; border-bottom: 92px solid transparent; border-left:45px solid rgba(0,0.7); display: inline-block; } .block { width: 200px; height: 80px; background: red; } <div class="rectangle"></div><!-- --><div class="triangle"></div> <div class="block"></div> 它从何而来?如何在没有负边距的情况下摆脱它(因为在某些屏幕上它们可能重叠). 解决方法
其他答案提供了解决方案,但不是出现这种情况的原因:
Some given funny joke -----^---------^-^ 在那个字符串中我标记了三个字符.这三个人都被称为’decenders‘(例如:G下的环,Y和J下的腿). 这就是设置line-height:0的原因;字体大小:0;诀窍. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- HTML img align =“middle”无效
- html – 更改ios上多个选择输入的默认文本
- web应用程序 – window.crypto.getRandomValues()的兼容性
- coffeescript – Sublime Text 3 Better Coffee Script包
- 一个MutationObserver对象可以观察多个目标吗?
- html – 如何将CSS元素直接放在彼此之下?
- html – Bootstrap – 添加图例
- 输入 – Magento2结帐表单:如何在字段中显示占位符属性值?
- html – 位置:绝对导致水平滚动条
- 我可以将HTMLUnit配置为仅运行特定的javascript进程而不是整