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

查看:86
本文介绍了【读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.

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

解决方案

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

这篇关于【读CSS规范】关于浮动的规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆