创建规则:
1,根元素
2、 浮动元素(float不是none)
3、 绝对定位元素(position取值为absolute或fixed)
4、 display 取值为 inline-block, table-cell, table-caption, flex, inline-flex 之一的 元素
5、 overflow 不是 visible 的元素
作用:
1、 可以包含浮动元素
2、 不被浮动元素覆盖
3、 阻止父子元素的margin折叠

Was this helpful?

1 / 1

发表回复 0

Your email address will not be published.