Ich schreibe gerade ein Quiz in html
und möchte zwischen den Fragen einen durchgängigen vertikalen Leerraum einfügen (wie bei der Verwendung von vspace{3 cm}
in LaTeX).
Beispielsweise:
<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>
Gibt es eine einfache Möglichkeit, dies mit nur html
und css
zu tun?
Lesen Sie einige CSS, es macht Spaß: 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>
schreib es so
p {
padding-bottom: 3cm;
}
oder
p {
margin-bottom: 3cm;
}
Die obigen Antworten eignen sich wahrscheinlich am besten für diese Situation. Wenn Sie jedoch nur eine einmalige Änderung vornehmen und sich nicht mit dem Ändern anderer Dateien befassen möchten, können Sie das CSS inline stellen.
<p style="margin-bottom:3cm;">This is the first question?</p>
ich benutze dieses billige Wort immer für vertikale Räume.
<p>Q1</p>
<br>
<p>Q2</p>