是否可以对两个或多个内联 block 使用不同的行高? 示例:
.block{
width: 300px;
}
.text-1 {
font-size: 30px;
line-height: 30px
}
.text-2 {
font-size: 20px;
line-height: 15px
}
<div class="block">
<span class="text-1">Here some text here some text</span>
<span class="text-2">other text other text other text</span>
</div>
最佳答案
.text-1 {
line-height: 1.5em;
}
.text-2 {
line-height: 1em;
font-size: 0.8em;
color: #555;
}
div{
width: 400px;
font-size: 2.5em;
font-color: #000;
font-family: sans-serif;
}
<div>
<span class="text-1">Here some text here some text</span>
<span class="text-2">other text other text other text other text other text</span>
</div>
关于css - 是否可以对两个或多个内联 block 使用不同的行高?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45866699/