We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 ? 英文全称 Block Format Context 的缩写,简单理解就是具备BFC特性的元素, 就像被一个容器所包裹, 容器内的元素在布局上不会影响外面的元素。
需要使用 BFC 的场景:解决 margin 层叠、文字环绕、浮动元素的父元素高度有误 这些问题;
margin
集中比较常见的触发 BFC 的条件:
???
float: left / right
position: absolute / fixed
display: inline-block
display: table-cell
visible
display: flex
display: grid
The text was updated successfully, but these errors were encountered:
No branches or pull requests
《前端面试之BFC》
需要使用 BFC 的场景:解决
margin
层叠、文字环绕、浮动元素的父元素高度有误 这些问题;集中比较常见的触发 BFC 的条件:
???
;float: left / right
;position: absolute / fixed
;display: inline-block
;display: table-cell
;visible
的块元素;display: flex
;display: grid
;The text was updated successfully, but these errors were encountered: