CSS Position Properties

Source: Internet
Author: User

The Position property in CSS is used to represent the location information of an element.

There are three values: static, Absolute, relative. If the element is not explicitly configured with the Position property, the default position value for that element is static.

1, Static: This is to indicate that the element is arranged and nested in the order and the rule should be in the position, at this time set Top,right,left, the bottom property is invalid;

2, Absolute: The location reference point is the most recent configuration of the Position property value is non-static parent node element, if all of its parent nodes are not explicitly configured position property, then the browser window location as a reference, at this time set Top,right,left, Bottom property value is valid;

3, relative: Position reference point is its original position (the element position is configured as static position), at this time set top,right,left, bottom attribute value is valid;

The Z-index property is used to specify the value of the z-coordinate in three-dimensional coordinates (x, y, z), which is 0 by default, can be set to a positive number, or negative, and the higher the value, the higher the z-axis direction.

Note: This property must be valid only if the element is configured with the Position property value of Relative/absolute.

CSS Position Properties

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.