基于表格的布局与基于Div的布局 [英] Table-Based Layout vs Div-Based Layout

查看:92
本文介绍了基于表格的布局与基于Div的布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

我只想知道基于表格的布局和基于div的布局之间的区别。什么时候应该使用什么和为什么?

I just want to know the difference between table-based layout and div-based layout. When should I use what and why?

在此先感谢。

Thanks in advance.

推荐答案

<很简单,基于表格的布局是组织内容位置的旧方式,而divs是更新的方式。把它们想象成不可见的矩形(除非你选择让它们可见),它们都有内容,并且都有它们的优点和缺点,如何定位它们。

Very simply, table based layouts were the old way of organising the position of content and divs are the newer way. Think of them as being invisible rectangles (unless you choose to make them visible) that hold content and both have their pros and cons in how you are able to position them.

您几乎可以将div放入桌面可以放置的几乎所有场合中,而您可以使用div做很多定位,而无法使用表格。这是使用表格布局页面的原因之一。

You can position divs into nearly every situation a table can be positioned into, whereas there's a lot of positioning you can do with divs that you can't do with tables. This is one reasons why using tables to layout your page is discouraged.

表格并没有完全消失。他们仍然非常擅长(有趣的)基于表格的信息或统计数据显示。考虑excel类型的布局。

Tables haven't completely disappeared. They're still very good at (funnily enough) table-based display of information or statistics. Think excel-type layouts.

这篇关于基于表格的布局与基于Div的布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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