如何在HTML文档中插入垂直空格? [英] How can I insert vertical blank space into an html document?
本文介绍了如何在HTML文档中插入垂直空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在用html
编写测验,我想在问题之间插入一致的空白垂直空格(就像在LaTeX中使用vspace{3 cm}
一样).
I am writing a quiz in html
and I would like to insert a consistent blank vertical space between questions (like one would use vspace{3 cm}
in LaTeX).
例如:
<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
可以做到这一点?
Is there a straight forward way of doing this using just html
and css
?
推荐答案
Read up some on css, it's fun: 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>
这篇关于如何在HTML文档中插入垂直空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文