我在一个主<p>标记中有许多<br />标记。
我想增加<br>创建的视觉空间(例如页边距、顶部和底部)。
<p>
Some text here<br />
Some other text<br />
Some other text
</p>我可以使用不同的<p>,但我必须在我的网站上这样做。
你知道如何增加<br>创建的空间吗?非常感谢。
发布于 2011-09-14 18:49:15
发布于 2018-07-13 16:31:52
如果你不想使用css,试试这段代码。当您将样式与
在Html文件中,javascript编程将优先考虑您在Html文件中的顺序,而不是css文件中的同一个类。
<p style="line-height: 2.7">
Some text here<br />
Some other text<br />
Some other text
</p>
<p style="margin-top: 3.5em">
Some text here<br />
Some other text<br />
Some other text
</p>
<p style="line-height: 0.6; margin-top: 7.0em">
Some text here<br />
Some other text<br />
Some other text
</p>
我希望我的回答对你的问题有帮助。
诚挚的问候,
Wahab
发布于 2011-09-14 18:49:20
您需要使用line-height属性。
p {line-height:70px}https://stackoverflow.com/questions/7415059
复制相似问题