CSS Lesson Two

Source: Internet
Author: User

First, block-level elements and inline elements

1, block-level elements: (1) block-level elements inside the content default in the upper left corner;

(2) block-level elements in a single row by default;

2, inline elements: (1) will not be affected by height and width

(2) Inline elements do not occupy a single line.

Second, box model

1, padding:1px up and down the internal margin

1px 2px up/down, left and right margin

1px 2px 3px Top, left, bottom padding

1px 2px 3px 4px top, bottom, left, right padding

Padding applies to block-level elements and inline elements

2, Margin:margin to block-level elements all applicable, inline elements around the applicable, up and down not applicable

3, border: Border type border thickness border color.

Third, relative positioning and absolute positioning

Difference: 1, set absolute positioning to out of the document flow, and set relative positioning is not detached

    2, absolute positioning is relative to the entire form, relative positioning is relative to the parent tag

CSS Lesson Two

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.