Html 使用标签 p 的 css 停用换行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7245634/
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
Deactivate line feed with css of tag p
提问by Francesc Clopes
Hello I'm defining a css style and I have a problem with the tag p. I am defining a style p tag and I get a line feed but I would like to deactivate its Line feed instead. How to do that?
你好,我正在定义一个 css 样式,但我的标签 p 有问题。我正在定义一个样式 p 标签,我得到一个换行符,但我想停用它的换行符。怎么做?
回答by RobB
I assume you are wanting to prevent multiple <p>
tags from adding a line-break. In this event, try p {display:inline};
to modify the display property.
我假设您想防止多个<p>
标签添加换行符。在这种情况下,尝试p {display:inline};
修改显示属性。
The preceeding CSS will remove the line-break by default. Depending on your criteria, you can modify it to reference a specific element or class.
默认情况下,前面的 CSS 将删除换行符。根据您的条件,您可以修改它以引用特定元素或类。
回答by punkrockbuddyholly
Do you mean the margin underneath? If so try...
你是说下面的边距吗?如果是这样试试...
p {
margin-bottom:0;
}