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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 00:50:34  来源:igfitidea点击:

How to increase or decrease space between two lines in same paragraph?

css

提问by YsoL8

Question says everything. How to do it with CSS?

问题说明了一切。如何用 CSS 做到这一点?

I have also created a fiddle here.

我还在这里创建了一个小提琴。

回答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 fontvalue or you can use a measurement like pxor 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%