CSS in Depth: Ch03

 20th August 2020 at 2:19pm

书中描述了一个简单的双栏布局的实现,纪录在 CSS: Layout: Implement: Traditional 2-column Implement

CSS Table 那部分觉得没什么意义,因为这是当时为了废弃主流的 <table> 布局而出现的产物,但是用 <div><ul> 配合 CSS 来实现本来 <table> <td> 做的事情,让人觉得 没有意义(甚至更差)。

接下来的 Flexbox 我没有细看,因为书中讲得也不深。我觉得单独找时间来研究会更好。

配合使用 min-heightmax-height 大部分情况下会比直接使用 height 更好。

垂直居中元素的作法,纪录在 CSS: Layout: Implement: Vertical Centering Content

Negative margin,又是一个实用价值不大的特性。可能在 CSS 框架构建 column layout 时有用。

Collapsed margin,纪录在 CSS: Layout: Box Model

3.5 Spacing elements within a container 不在关注之列。