我有一大段的文本,分为<br>的子段落:
<p>
Blah blah blah.
<br/>
Blah blah blah. Blah blah blah. Blah blah blah.
<br/>
Blah blah blah.
</p>
我想扩大这些分段之间的间隔,比如有两个<br>之类的。我知道这样做的正确方法是使用<p></p>,但现在我不能改变这个布局,所以我正在寻找css的解决方案。
我试着用display: block设置<br>的行高和高度,我也谷歌了一下,堆栈溢出了,但没有找到任何解决方案。在不改变布局的情况下,这可能吗?
而不是
<br>,<br/>,<hr> or <span></span> and trying different CSS properties to these tag.
我做了,我把段落放在一个div中,并给它行高:2px
# html
<div class="smallerlineHeight">
<p>Line1</p>
<p>Line2</p>
</div>
#css
.smallerlineHeight {
p {
line-height: 2px;
}
}
而不是
<br>,<br/>,<hr> or <span></span> and trying different CSS properties to these tag.
我做了,我把段落放在一个div中,并给它行高:2px
# html
<div class="smallerlineHeight">
<p>Line1</p>
<p>Line2</p>
</div>
#css
.smallerlineHeight {
p {
line-height: 2px;
}
}