Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bfc的理解 #153

Open
zhengwei1949 opened this issue Apr 16, 2019 · 0 comments
Open

bfc的理解 #153

zhengwei1949 opened this issue Apr 16, 2019 · 0 comments

Comments

@zhengwei1949
Copy link
Owner

清除浮动只有两种方式,一是使用clear属性清除浮动,二是使父容器形成BFC。
大白话理解BFC:创建BFC好比创建了一个封闭的大箱子,里面的元素无论如何翻江倒海,都不会影响外部。
大白话理解BFC plus版:BFC好比一个伊拉克美军的关塔那摩监狱,创建后里面的元素必须规规矩矩的,也不能相互挨着,跟无法越狱去外面做坏事,那么老是跳的元素也不敢乱动,否则美女军官就...分别对应三个特性:上下外边距不折叠、包含浮动元素(清除浮动)、阻止元素被浮动元素遮挡。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant