在CSS中,我们可以使用lineheight属性来控制两行文字之间的行间距。p { lineheight: 1.2; } 其中,lineheight的值可以是数字、百分比或者长度单位。为了让两行文字更...
在CSS中,我们可以使用line-height
属性来控制两行文字之间的行间距。
p {
line-height: 1.2;
}
其中,line-height
的值可以是数字、百分比或者长度单位。
为了让两行文字更加紧密,我们可以将line-height
的值调小,例如:
p {
line-height: 1;
}
但是要注意,将行间距调得太小可能会导致文字重叠,影响页面的可读性,所以需要根据具体情况进行调整。