在网页中创建空间 [英] creating space in a webpage

查看:77
本文介绍了在网页中创建空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在网页中获得空间,那么最好的方法是什么。例如,如果我想在两个水平规则之间创建空间,我可以这样做:

< hr />

< br>

< br>

< br>

< hr />

或者这个:

< hr />

< pre>


< / pre>

< ; hr />


有更优雅的方式吗?

If I am trying to achieve space in a webpage, what is the best way to do it. For example if I were looking to create space between two horizontal rules, I could do this:
<hr />
<br>
<br>
<br>
<hr />
or this:
<hr />
<pre>


</pre>
<hr />

Is there a more elegant way?

推荐答案

你可以创建两个div并绝对定位它们如果你愿意的话。
You could create two divs and absolutely postion them apart if you want.


如何以奇特的方式使用表。
How about using tables in a fancy way.


总是使用CSS。

hr {

保证金:20px;

填充:20px;

}

永远不要使用表格进行布局。
Always use CSS.
hr {
margin:20px;
padding:20px;
}

Never, ever use tables for layout.


这篇关于在网页中创建空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆