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?如何形成BFC?BFC有什么使用场景 #44

Open
zhuguly-zz opened this issue Jul 1, 2020 · 0 comments
Open

什么是BFC?如何形成BFC?BFC有什么使用场景 #44

zhuguly-zz opened this issue Jul 1, 2020 · 0 comments

Comments

@zhuguly-zz
Copy link
Owner

BFC(Block Formatting Context)块级格式化上下文,是由块级元素参与构建、遵循一定规则的独立环境。
BFC的形成条件有以下几种:根元素,float不为none的元素,position为absolute、fixed、sticky的元素,display为inline-block、table-cell的元素,display为flow-root或flow-root list-item的元素,overflow为hidden、scroll、auto的元素。
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