1. haslayout and bfc are IE-specific and standard attributes. 2. BFC is an isolated independent container on the page. The child elements inside the container will not affect the elements outside, and vice versa. 3. BFC has 3 functions: 1. Contains floating elements, 2. Prevent overlap in screenwriting, 3. Prevent being covered by floating elements 4. Trigger conditions: float value other than None overflow values other than visible (hidden, auto, scroll) display (table-cell, table-caption, inline-block, flex, inline-flex) The position value is (absolute, fixed) The fieldset element It is important to remember that bfc is an independent container that does not affect other layouts and will not be affected. By using its characteristics, you can solve problems such as clearing floats and 2-column layouts. Example: 2-column adaptive layout 1. Solve it with floating and negative margin 2. Trigger bfc and will not be covered by floating elements |
<<: Implementation of CSS text shadow gradually blurring effect
>>: HTML Editing Basics (A Must-Read for Newbies)
This article shares the specific code of JavaScri...
Allow './' relative paths in docker-compo...
CSS issues about background gradient and automati...
Table of contents 01 Introduction to YAML files Y...
This article example shares the specific code of ...
Table of contents background Why error handling? ...
0. When I made this document, it was around Decem...
1. Native network request 1. XMLHttpRequest (w3c ...
1. Vector Map Vector graphics use straight lines ...
The encapsulation and use of Vue's control pr...
Hexo binds a custom domain name to GitHub under W...
First, understand the updatexml() function UPDATE...
JavaScript shows and hides pictures, for your ref...
Modern browsers no longer allow JavaScript to be ...
When talking about this issue, some people may ask...