Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] 第111天 你有用过table布局吗?说说你的感受 #1026

Open
haizhilin2013 opened this issue Aug 4, 2019 · 4 comments
Open
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第111天 你有用过table布局吗?说说你的感受

@haizhilin2013 haizhilin2013 added the css css label Aug 4, 2019
@xiangshuo1992
Copy link
Contributor

用来做列表排版还是很不错的,但是要想用的好,还是要对table有比较多的了解。
比如实现表头固定,表内容超出滚动的效果等

@nowherebutup
Copy link

有时候写demo,不想引入UI组件库时,使用原生的,
不过实际开发的工作中,都是 用现成的UI组件库,
总体来说还是用现成的比较方便

@AnsonZnl
Copy link
Contributor

AnsonZnl commented Aug 6, 2019

最近再用,感觉还不错哈哈

@Konata9
Copy link

Konata9 commented Aug 19, 2019

div + css 布局成为主流之前,基本都是以 table 布局为主。曾经的三剑客,Dreamever 的所见即所得也是利用 table 来做布局。

table 布局对于排版比较友好,水平居中、垂直居中都可以利用 table 的属性来完成。但缺点也是十分明显的。

  • table 布局往往是 table 嵌套 table,会有非常多的 DOM 节点,对于性能来说是一个灾难
  • 语义化不明,本身就是标签错误的用法。因此对 SEO 不友好。
  • DOM 操作是噩梦,无数的 trtd 中要寻找到目标 DOM 元素非常困难,代码没有维护性可言。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

5 participants