CSS 更改段落之间和段落内部的间距

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41253908/
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 12:18:04  来源:igfitidea点击:

Changing spacing between paragraphs and inside of paragraphs

cssspacingparagraph

提问by Dan

I found a similar topic, to this, but I can't find the specific CSS to change in Wordpress. If you go to my homepageOr blog

我找到了一个与此类似的主题,但是我找不到要在 Wordpress 中更改的特定 CSS。如果你去我的主页博客

I want to change the spacing within and between paragraphs. Not sure which element I need to modify in my CSS.

我想更改段落内和段落之间的间距。不确定我需要在 CSS 中修改哪个元素。

Found a line-heightproperty for .body, but that doesn't seem to do what I want.

为 找到了一个line-height属性.body,但这似乎不是我想要的。

回答by David542

Between paragraphs you should set a marginfor that element. Between lines within the paragraph you can use line-height. For example:

在段落之间,您应该margin为该元素设置 a 。在段落内的行之间,您可以使用line-height. 例如:

p {
  line-height: 32px;   /* within paragraph */
  margin-bottom: 30px; /* between paragraphs */
  }

enter image description here

在此处输入图片说明