1. Understand the Box Model in depth and understand the Box Model in Depth

Source: Internet
Author: User

1. Understand the Box Model in depth and understand the Box Model in Depth
Box Model

1. Composition of the Box Model: margin border padding content;

2. border:

In attribute value settings, if two attribute values are given, the former indicates the upper and lower border attributes, and the latter indicates the Left and Right Border attributes. If three attribute values are given, the former indicates the upper border, in the middle, it indicates the left border, and the latter indicates the bottom border. If four attribute values are given, they are in the order of top, right, bottom, and left. When setting the background, the browser will overwrite content, padding, and border.

2. margin:

1) We need to record that the horizontal margin is the sum, and the vertical margin will cause collapse, using a large margin.

2) margin of nested boxes: The child block uses the content of the parent block as a reference.

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.