css - BFC margin collapse issue
巴扎黑
巴扎黑 2017-05-16 13:43:46
0
1
596

http://w3help.org/zh-cn/kb/010/
The two sentences in bold are folded or not?

In a block formatting context, boxes are placed vertically one after the other, with their starting point being the top of a containing block. The vertical distance between two sibling boxes depends on the 'margin' attribute. The vertical margins of adjacent block-level elements collapse (collapse) in a block formatting context.

It is similar to a normal block box, except that:

Can contain floating elements
Can prevent margin folding
Can prevent elements from being covered by floating elements

巴扎黑
巴扎黑

reply all(1)
PHPzhong

You can prevent margin folding by forming a new block formatting context. You can read my article, there is a special article about this

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!