CSS - 行间距 [英] CSS - Line Spacing
本文介绍了CSS - 行间距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用CSS设置行间距,就像我们可以在MS Word中设置行距?
How can I set line spacing with CSS, like we can set line spacing in MS Word?
推荐答案
code> line-height 属性。
Try the line-height
property.
例如,12px font-size和4px距离底部和上面的行: / p>
For example, 12px font-size and 4px distant from the bottom and upper lines:
line-height: 20px; /* 4px +12px + 4px */
或使用 em
单位
line-height: 1.7em; /* 1em = 12px in this case. 20/12 == 1.666666 */
这篇关于CSS - 行间距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文