There are two div with nested relationship, if the padding value of the parent element of the outer div is 0, then the value of Margin-top or Margin-bottom of the inner Sub Div will be transferred to the outer parent Div, that is, the Magrin collapse phenomenon.
Workaround:
1. Add: Overflow:hidden on the parent element div;
2. Change the outer margin of the margin-top to the padding-top inner margin;
3. Parent Element Div produces margin overlapping edges with border that are not 0 padding or width not 0 and style is not none; the parent element adds padding-top:1px;
4. Let the parent element generate a block formating context, the following properties can be implemented
* Float:left/right
* Position:absolute
* Display:inline-block/table-cell (or other table type)
* Overflow:hidden/auto
Parent-level div plus: position:absolute;
Margin collapse phenomenon (that is, the solution to set margin-top in the inner layer is invalid)