Three basic Positioning Mechanisms in css and three css positioning mechanisms

Source: Internet
Author: User

Three basic Positioning Mechanisms in css and three css positioning mechanisms

Three basic Positioning Mechanisms in css

A. Normal Document Stream

B. Positioning: relative positioning

Absolute Positioning

Fixed Positioning

C. Floating

1. in a normal stream, the element positions are determined by the document sequence and element nature. Block-level elements are arranged from top to bottom in sequence. The vertical distance between frames is calculated by the vertical margin value of the boxes, horizontal layout of row elements in a row

2. Relative positioning is regarded as a part of a normal stream. The moving element still occupies the original position, and moving the element will overwrite other boxes.

3. Absolute positioning: relative to the most recent ancestor element that has been located, absolute positioning is separated from the normal stream

4. Fixed positioning is relative to browser window Positioning

5. The floating element can be moved left and right until its outer border edge hits the edge of a box containing its own or another floating box.

6. Floating elements are separated from normal document streams

7. In-row and In-row block elements are arranged around floating boxes, and block elements are overwritten.

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.