Home  >  Article  >  Web Front-end  >  What is margin overlap

What is margin overlap

尚
Original
2020-04-21 14:46:014848browse

What is margin overlap

Margin overlap: refers to the adjacent boundaries of two or more boxes (which may be adjacent or nested) (without any non-empty content, padding, or borders in between). together to form a single boundary.

Under what circumstances will margin overlap occur:

1. The top boundary of the element overlaps the bottom boundary of the previous element

What is margin overlap

2 , the top border of the element overlaps the top border of the parent element. The border-top border is the same as its parent element.

What is margin overlap

3. The top and bottom borders of the element overlap

Suppose there is an empty element, which has a border, but no border or padding. In this case, the top border and the bottom border touch together

What is margin overlap

4. The superimposed boundary of the empty element overlaps the boundary of another empty element

What is margin overlap

Recommended related video tutorials: css video tutorial

The above is the detailed content of What is margin overlap. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn