我正在用 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 的简单方法来实现此目的?
如何在 HTML 文档中插入垂直空格?
最佳答案
阅读一些关于 CSS 的内容。这很有趣: CSS: em, px, pt, cm, in…
<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>
关于html - 如何在 HTML 文档中插入垂直空格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9140999/