CSS Position Positioning essentials

Source: Internet
Author: User

I. Total of four positioning methods

  1. static , this property default property, set before and after the left and right values do not affect the label position, fart with no.

2 relative, after using this property, you can show the coordinates in the original location for the origin of the left and right before and after the move. The original position is retained after moving, otherwise it will disturb the subsequent label positioning

3 Absolute, relative to the container before and after positioning, if the parent container label page does not include this property or the absolute property, relative to the entire HTML.

The parent container's CSS also joins position:relativ\ absolute\fix three properties, then the relative movement of this label moves around the container boundary to the left and right

The parent container does nothing or add staic, and the tag is all HTML-positioned.

4 Fixed in the screen guide position, does not change the position with the scroll bar change

CSS Position Positioning essentials

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.