Introduce how to use CSS margins

零下一度
Release: 2017-05-16 11:30:11
Original
2584 people have browsed it

CSSMargin(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.

In CSS, it can specify different margins on different sides:

Example

687027a8fb8916ec0e6515226cdbe58a

The margin attribute can have one to four values. /p>

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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!