【发布时间】:2021-01-23 11:59:38
【问题描述】:
我的应用程序中有以下组件
.call-support {
display: flex;
justify-content: center;
padding: 20px 0 20px 0;
}
.container-support {
display: flex;
align-items: center;
}
.support-text {
text-align: center;
margin-left: 10px;
}
.title-text {
font-family: "RalewayRegular";
font-weight: bold;
font-size: 16px;
}
.subtitle-text {
font-family: "RalewayRegular";
font-weight: normal;
font-size: 16px;
}
.customer-service-request {
display: flex;
flex-direction: column;
align-items: center;
padding: 10% 0 20% 0;
}
.request-text {
display: flex;
}
.number {
font-size: 18px;
color: #D53865;
font-weight: bold;
background-color: #f9f4f1;
width: 340px;
height: 130px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.number:before {
content: "";
position: absolute;
top: 0;
right: 0;
border-top: 65px solid #666B74;
border-left: 65px solid #f9f4f1;
width: 0;
border-bottom: 65px solid #666B74;
}
.subtitle-number {
position: absolute;
font-family: "RalewayRegular";
font-weight: normal;
font-size: 12px;
display: flex;
margin-top: 40px;
}
.number-request {
font-family: "RalewayRegular";
color: #fff;
font-size: 18px;
font-weight: bold;
background-color: #666B74;
height: 40px;
width: 340px;
height: 130px;
display: flex;
justify-content: center;
align-items: center;
}
<div class="call-support">
<div class="container-support">
<div class="request-text">
<p class="number">000 000 000<span class="subtitle-number">(local call)</span></p>
<p class="number-request">Customer Service</p>
</div>
</div>
</div>
除了在 Internet Explorer 中,“subtitle-number”的边距顶部显示它几乎粘在它所属的框的边距底部之外,它在所有浏览器中的布局都很好。
我在这里留下了一个带有设计的 codepen 的链接。
https://codepen.io/CharlieJS/pen/dyXyBBe
如何调整设计以在所有浏览器中显示?
为什么 IE 的 margin-bottom 更高?
感谢大家的宝贵时间和帮助
【问题讨论】:
-
第一次请接受编辑,设置 sn-p 并将
font-size:16;更正为font-size: 18px;应用于:.number-request -
@MaxiGui 请不要伪造人们在您的编辑中发布的代码。如果您认为将提到的字体大小更改为您所说的(部分)解决方案,那么您应该在评论中提出建议,或者写下答案。
-
@04FS 我不认为这是解决方案的一部分,我认为他没有通过举例来关注。因为他的形象很好,不是他描述的问题
标签: html css vue.js internet-explorer