如何更改< br&gt ;?的高度 [英] How to change the height of a <br>?

查看:100
本文介绍了如何更改< br&gt ;?的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大段落的文本,分为< br> 的子段落:

 < p> 
Blah blah blah。
< br />
Blah blah blah。等等等等等等。等等等等等等。
< br />
Blah blah blah。
< / p>

我想扩大这些分段之间的差距,就像有两个 ; br> '或类似的东西。我知道正确的方法是使用< p>< / p> ,但现在我不能改变这种布局, - 只有解决方案。



我已经尝试设置< br> -height height display:block ,我也Googled和Stack Overflow-简单地,但没有找到任何解决方案。













p $ p> br {
display:block;
margin:10px 0;
}

解决方案可能不是跨浏览器兼容的,但至少是这样。还要考虑设置 line-height

  line-height:22px; 

对于Google Chrome,设置内容

  content:; 

除此之外,我认为你使用JavaScript解决方案。


I have a big paragraph of text that is divided into subparagraphs with <br>'s:

<p>
  Blah blah blah.
  <br/>
  Blah blah blah. Blah blah blah. Blah blah blah.
  <br/>
  Blah blah blah.
</p>

I want to widen the gap between these subparagraphs, like there is two <br>'s or something like that. I know that the right way to do this is to use <p></p>, but right now I cannot change this layout, so I am looking for CSS-only solution.

I've tried setting <br>'s line-height and height with display: block, I also Googled and Stack Overflow-ed briefly, but did not find any solution. Is this even possible without changing the layout?

解决方案

Css:

br {
   display: block;
   margin: 10px 0;
}

The solution is probably not cross-browser compatible, but it's something at least. Also consider setting line-height:

line-height:22px;

For Google Chrome, consider setting content:

content: " ";

Other than that, I think you're stuck with a JavaScript solution.

这篇关于如何更改&lt; br&gt ;?的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆