移动端android上line-height不居中的问题的解决
废话不多话,直接上代码,如下:
.btn {
width: 1.5rem;
max-width: 100px;
text-align: center;
height: .56rem;
font-weight: bold;
font-size: .28rem;
background: #F7BF0F;
border-radius: 4px;
line-height:.56rem;
}
.btn::before {
content: '';
display: inline-block;
vertical-align: middle;
width: 0;
height: 100%;
margin-top: 1px;
}
模拟器效果