CSS 如何增加或减少同一段落中两行之间的空间?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6456210/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to increase or decrease space between two lines in same paragraph?
提问by YsoL8
回答by YsoL8
Use the line-height!
使用行高!
ie:
IE:
p {
line-height:20px;
}
回答by Jason Gennaro
Use line-height
用 line-height
.test{
line-height:40px;
}
http://jsfiddle.net/jasongennaro/jn3Vw/1/
http://jsfiddle.net/jasongennaro/jn3Vw/1/
You can set the value to anything: percentage or number, which will be multiplied by the font
value or you can use a measurement like px
or em
.
您可以将该值设置为任何值:百分比或数字,它们将乘以该font
值,或者您可以使用诸如px
或 之类的度量em
。
See more here: http://reference.sitepoint.com/css/line-height
在此处查看更多信息:http: //reference.sitepoint.com/css/line-height
回答by vamsi
use line-height property
使用行高属性
line-height:100% or line-height:200%
行高:100% 或行高:200%