Relative features of CSS

Source: Internet
Author: User

1. Self-Features:
  For example, the left right top bottom positioning is positioned relative to its position.  when left with right simultaneous existence, lfet takes effect.  when top with bottom simultaneous existence, top takes effect.  no intrusion, preserving the original position without affecting the layout of other elements.  can be used in the "custom Drag" scene.
2. The relationship between relative and absolute
  Restricting the positioning of internal elements limits the level of internal elements   absolut left/right/top/bottom  absolut z-index  absolut can be overflow overrun hidden inside elements
3. The relationship between relative and absolute:
  Limit fixed the level of internal elements only z-index
4. The relationship between relative and Z-index:
  When relative you set an element, you can increase the stacking context  when the hierarchy of z-index auto relative inner elements is not limited absoulte  z-index to numeric values, creating a cascading context that compares two relative The stack value size of the element,  not the comparison of the inner element.
5. Principles of Use:
  Avoid using elative as much as possible, minimize the  control area, and reduce to include only the internal elements to limit

Relative features of CSS

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.