display
值
flow-root
已添加到CSS规格中:元素生成一个块容器框,并使用流布局列出其内容。它始终为其内容建立一个新的块格式上下文。 [CSS2] - https://drafts.csswg.org/css-display/#valdef-display-flow-root
有创建块上下文的方法,例如overflow: hidden
.使用
display: flow-root
vs
overflow: hidden
包含浮动元素有什么不同?
display: flow-root
允许您的流量元素具有对您的重要性,因为compess box box box box box box box box box box box box box box box box boce n othots bocks note contectss note contection contection的bote上下文不正常。
我不知道是否有人在乎,但是流根管允许父母在自己内部包含浮动元素,而不会影响随后的元素的流动。见一个相当简单的例子。
overflow: visible
overflow: visible