CSS 2.1 defined four layout modes — algorithms which determine the size and position of boxes based on their relationships with their sibling and ancestor boxes:
block layout, designed for laying out documents
inline layout, designed for laying out text
table layout, designed for laying out 2D data in a tabular format
positioned layout, designed for very explicit positioning without much regard for other elements in the document
This module introduces a new layout mode, flex layout, which is designed for laying out more complex applications and webpages.
在班会第 32 期中我们通过Flexbox Froggy 游戏对 Flexbox 布局有了一些了解, 感觉用起来确实很方便, 就是属性有些多, 而且需要相互配合, 如果不仔细体会每个属性的含义和作用, 就很容易搞混了.
因此借着通关了Flexbox Froggy 游戏, 让我们再稍稍了解下关于 Flexbox 布局的一些细节和要点.
CSS Flexbox 布局是一种新的布局方式, 全称是
CSS Flexible Box Layout
, W3C 标准文档 CSS Flexible Box Layout Module Level 1 中给出的介绍如下CSS3 Flexbox属性可视化指南
CSS Flexbox 相关属性速记