
考虑以下代码:
<div > THis is a looooooooong text. and it goes on and on and on and on and on and on and on and on and on and on <br/> 2nd line <br/> 3rd line 3rd line 3rd line 3rd line 3rd line 3rd line 3rd line <br/> last line</div>
line-height适用于整个内容,并将CSS附加到< br> (即:br {margin:10px 0}),似乎也不起作用(至少在Chrome中),所以我想知道这是否可行.
谢谢.
jsfiddle
解决方法br{ content: " " !important; display: block !important; margin:30px;} 试试这个
总结以上是内存溢出为你收集整理的html – 在换行符之间添加垂直空间全部内容,希望文章能够帮你解决html – 在换行符之间添加垂直空间所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)