10 lines
758 B
Plaintext
10 lines
758 B
Plaintext
---
|
||
title: 你是否使用过网格系统,如果使用过,你更喜欢哪种?
|
||
---
|
||
|
||
在 Flex 变得流行之前(大约在 2014 年),基于 `float` 的网格系统是最可靠的,因为它在现有的替代系统(flex、grid)中仍然拥有最多的浏览器支持。Bootstrap 一直使用 `float` 方法,直到 Bootstrap 4 切换到基于 `flex` 的方法。
|
||
|
||
如今,`flex` 是构建网格系统的推荐方法,并且具有 [不错的浏览器支持 (99.64%)](https://caniuse.com/#search=flex)。
|
||
|
||
对于喜欢冒险的人,他们可以研究 [CSS Grid Layout](https://css-tricks.com/snippets/css/complete-guide-grid/),它使用全新的 `grid` 属性。Grid 是一个基于二维网格的布局系统,而 Flexbox 是一维的。
|