CSS Mastery摘要(6)--Page Layout and Grids

来源:互联网 发布:武汉广电网络收费标准 编辑:程序博客网 时间:2024/06/05 06:31
This chapter has been all about a systematic approach to designing layout systems for web pages, thinking
in terms of rows, columns, and gutters. We started out building a backward- and forward-compatible grid
system using floats, with inline blocks and flexbox properties jumping in to take the design even further.
For the entire history of CSS, we have needed to have nested element structures in place in order
to create structures to hold our layouts. This applies even for flexbox layouts, which are otherwise a very
powerful layout tool. We devoted the second half of this chapter to the CSS Grid Layout specification, where
a lot of these concerns are addressed. Layout using grid properties shifts the grid creation from individual
elements to the grid container, and we only need to place and align the items into the correct position.