如何减小< p>的内容区域的高度,与css? [英] how to decrease the height of content area for <p> with css?
问题描述
任何人都可以告诉我如何使用css降低p标记的内容区域的高度?
Could anyone tells me how to decrease the height of the content area for p tag with css?
我想要,
1.让底部橙色虚线更接近上面的文本。 (border-bottom:3px orange dotted;)
2.减小黄色高亮框的高度。 (body {background-color:yellow})
I want to, 1. bring the bottom orange dotted line closer to the text above. (border-bottom: 3px orange dotted;) 2. reduce the height of the yellow highlighting box. (body { background-color:yellow })
调整属性line-height和height不起作用...
adjusting the properties "line-height" and "height" don't help...
谢谢!
推荐答案
您应该能够使用line-height属性更改高度, css覆盖它。以确保您可以添加!important在结束像这样:
You should be able to change the height with the "line-height" property make sure there is not another css overwriting it. to make sure you can add !important at the end like this:
p {
line-height: 1em !important;
}
如果工作回到你的代码,并确保你没有另一个元素更改行高
if that worked go back to your code and make sure you dont have another element changing the line-height
这篇关于如何减小< p>的内容区域的高度,与css?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!