flexbox vs tables, why do we need flexbox?

前端 未结 3 1573
谎友^
谎友^ 2020-12-06 09:21

Can anyone please enlighten me on how the new Flexbox layout model is any better than current tables way? (display:table and all those are includedin my

3条回答
  •  攒了一身酷
    2020-12-06 10:13

    The Flexbox model is more powerful than display table. Flexbox supports layouts for right to left languages for example. And yes indeed, flexbox is a bit complex and that's an entry barrier. Float and clearfix layouts are a (clever) hack, somehow in the same way table layouts are a hack, flexbox is meant for layout.

    The browser support is getting better lately, some say we should use it now. Bootstrap 3 does however not make use of flexbox, but i can imagine that the next version will.

提交回复
热议问题