我正在用html
写测验,我想在问题之间插入一致的垂直空格(就像在LaTeX中使用vspace{3 cm}
一样)。
例如:
<html>
<body>
<p>
This is the first question?
<!-- this is where I want about 3 cm of space -->
</p>
<p>
This is the second question?
<!-- this is where I want about 3 cm of space -->
</p>
</body>
</html>
有没有一种只使用html
和css
就能做到这一点的直接方法
发布于 2012-02-04 21:04:03
读一些关于css的文章,它很有趣:http://www.w3.org/Style/Examples/007/units.en.html
<style>
.bottom-three {
margin-bottom: 3cm;
}
</style>
<p class="bottom-three">
This is the first question?
</p>
<p class="bottom-three">
This is the second question?
</p>
发布于 2018-02-20 06:00:22
虽然上面的答案对于这种情况可能是最好的,但如果你只想做一次,而不想麻烦地修改其他文件,你可以内联CSS。
<p style="margin-bottom:3cm;">This is the first question?</p>
发布于 2019-05-21 18:44:58
我总是用这个廉价的词来表示垂直空间。
<p>Q1</p>
<br>
<p>Q2</p>
https://stackoverflow.com/questions/9140999
复制相似问题