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
PHPz2017-05-16 13:45:46
You can prevent margin folding by forming a new block formatting context. You can read my article, there is a special article about this