Home  >  Article  >  Web Front-end  >  Introduce how to use CSS margins

Introduce how to use CSS margins

零下一度
零下一度Original
2017-05-16 11:30:112531browse

CSS Margin(Margin)PropertiesDefines the space around the element.

Margin

margin clears the area around the element (outer border). Margin has no background color and is completely transparent

margin can change the top, bottom, left, and right margins of the element independently. It is also possible to change all properties at once.

Margin can use negative values ​​and overlapping content.

18c470802f0a2fc537972c41232405c3

margin:25px 50px 75px 100px;

The top margin is 25px

The right margin is 50px

The bottom margin is 75px

The left margin is 100px

margin:25px 50px 75px;

The top margin is 25px

The left and right margins are 50px

The bottom margin is 75px

margin:25px 50px;

The top and bottom margins are 25px

The left and right margins are 50px

margin:25px ;

All 4 margins are 25px

[Related recommendations]

1. Special recommendation"php Programmer Toolbox" V0.1 version download

2. Free css online video tutorial

3. php.cn Dugu Jiujian (2)-css video tutorial

The above is the detailed content of Introduce how to use CSS margins. 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