1
我试图垂直居中直列块这样的:行高不垂直中心内联块
div {
width: 50px;
height: 50px;
background: red;
line-height: 50px;
}
span {
display: inline-block;
width: 20px;
height: 20px;
background: white;
}
<div>
<span></span>
</div>
但跨度不垂直居中。为什么?
它仍然不居中。跨度为16px,下方为14px。 – Gropai