Home > Article > Web Front-end > What are the properties for setting element margins in css3
The attributes for setting element margins include: margin, margin-bottom, margin-left, margin-right, margin-top, padding, padding-bottom, padding-left, padding-right, etc.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
In CSS3, there are two properties for setting element margins:
Margin property
Padding properties
Instructions | |
---|---|
Set all margin properties in one declaration | |
Set the bottom margin of the element | |
Set the left margin of the element | |
Set the right margin of the element | |
Set the top margin of the element |
Description | |
---|---|
Set all padding properties in one declaration | |
Set the bottom padding of an element | |
Set the left padding of the element | |
Set the right padding of the element | |
Set the top padding of the element |
css video tutorial)
The above is the detailed content of What are the properties for setting element margins in css3. For more information, please follow other related articles on the PHP Chinese website!