A Brief Introduction to the margin parameter and a brief introduction to margin

Source: Internet
Author: User

A Brief Introduction to the margin parameter and a brief introduction to margin

A Brief Introduction to the margin parameters:

This attribute is used to set the outer margin of an element. It is no longer described here. The only problem that may cause this attribute is its parameter, because it can have up to four parameters, there are also abbreviations. For example, you can only include one parameter. The following is a brief introduction.

The parameter list is as follows:

1. When there is a parameter, it will act on the four sides, for example, margin: 10px.

2. When there are two parameters, the first is used for top and bottom, and the second is used for left and right, for example, margin: 10px auto.

3. When there are three parameters, the first is used for the top, the second is used for the left and right, and the third is used for the bottom, for example, margin: 10px 5px 20px.

4. When there are four parameters, the order of top, right, bottom, and left will be applied to the four sides, for example, margin: 5px 10px 20px 5px.

For more information, see the section "margin attributes" in CSS.

Original address: http://www.51texiao.cn/div_cssjiaocheng/2015/0525/2444.html

The most original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9622.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.