[英]Angular md-button destroys alignment
When i don't insert md-button everything works perfectly. 当我不插入md-button时,一切正常。 But when I add md-button, span doesn't work properly.
但是,当我添加md-button时,span无法正常工作。 The number "5" goes down.
数字“ 5”下降。 How can I solve this problem?
我怎么解决这个问题?
HTML: HTML:
<button md-button class="special-orders">xüsusi təkliflər <span>5</span></button>
CSS: CSS:
.special-orders {
font-size: 15px;
color: white;
span {
font-size: 11px;
display:inline-block;
width: 15px;
height: 15px;
text-align: center;
color: #FF2868;
background-color: white;
border-radius: 50%;
vertical-align: middle;
padding: 0;
}
}
The material styling sets the line-height on the button to 36px which seems to be causing the problem with the span having a fixed height and width. 材质样式将按钮上的行高设置为36px,这似乎导致跨度具有固定高度和宽度的问题。 Setting the line height on the span as well is easier than trying to line everything up.
在跨度上设置线条高度比尝试将所有线条对齐都容易。
.special-orders {
font-size: 15px;
color: white;
span {
line-height: 18px;
width: 18px;
display:inline-block;
text-align: center;
color: #FF2868;
background-color: white;
border-radius: 50%;
vertical-align: middle;
padding: 0;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.