When two empty block-level elements are nested, if the inner block has a margin-top attribute and does not have the characteristics described in the solution below, the margin-top attribute of the inner block kidnaps the parent element (i.e., the margin-top is passed to the parent element).
1, set the parent element or display:inline-block; 2. Set the border of the parent element to 1px aqua solid; (>0) 3. Set the padding of the parent element to 1px; (>0) 4, Set overflow:hidden; 5. Set position:absolute to the parent element or itself. 6. Set the parent element to non-empty and fill it with certain content.
(Effect before failure)
(Effect after solving failure)