【读CSS规范】关于浮动的规则

A floating box's outer top may not be higher than the top of its containing block. When the float occurs between two collapsing margins, the float is positioned as if it had an otherwise empty anonymous block parent taking part in the flow. The position of such a parent is defined by the rules in the section on margin collapsing.

请问加粗的那句如何理解?

阅读 1.8k
1 个回答

empty anonymous block parent 会被 collapse through,也就是变 float 脱离流之后原来位置的其它 in flow 元素按正常方式重新计算 collapse。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题