html - 如何在 HTML 文档中插入垂直空格?

标签 html css whitespace

我正在用 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/

相关文章:

JavaScript 从文本框文本更改背景图像

c++ - GNU readline 空格引用

twitter-bootstrap - 使用 Twitter Bootstrap 添加垂直空白?

python - 用 ply 转义正则表达式中的空格?

javascript - 在javascript中的文本之间创建空间

php - Wordpress 循环在页面循环开始时创建空白空间

html - 我如何居中 <img/> <h1>...</h1> <img/> HTML + CSS?

javascript - jquery ajax html 响应...更改输入值不起作用

javascript - 如何在 JavaScript 中运行原型(prototype)内部的回调函数?

javascript - 如何在 Wix 网站上运行 jquery?