BFC是个简称,英文名是Block Formatting Content,中文名是 暴风城 块级格式上下文,他还有3个兄弟姐妹分别是IFC,FFC,GFC
BFC是个概念,一个特定的环境,决定了元素如何定位,如何布局,规定了内部元素的行为和对外部元素的表现
<html>
float: left;
/ float: right;
position: absolute;
/ position: fixed;
display: inline-block;
display: flex;
/ display: inline-flex;
display: grid;
/ display: inline-grid;
display: table-cell;
display: table-caption;
display: table;
html table的默认值display: table-row;
html row的默认值display: table-row-group;
html tbody的默认值display: table-header-group;
html thead的默认值display: table-footer-group;
html tfoot的默认值column-count
或 column-width
不为 auto
,包括 column-count
为 1overflow
值 不为 visible
的块元素: overflow: auto;
/ overflow: hidden;
/ overflow: scroll;
contain
值 为 layout
、content
、paint
的元素