What is the Z-index property of CSS for?

Source: Internet
Author: User

The Z-index property of CSS is what it does:
recommendation : As far as possible handwriting code, can effectively improve the learning efficiency and depth.
In web authoring, there may be a need to have several layers overlap and to specify the order, which is a good choice when using the Z-index property.
However, this property is only used for the [position property value of relative, [absolute , or fixed object and will not be used for window controls, such as a select object.
The instance code is as follows:

<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">. Index1,. Index2,. Index3{position:Absolute;width:150px;Height:100px;}. Index1{Z-index:1;Background-color:#663}. Index2{Z-index:2;Top:50px; Left:50px;Background-color:#303}. Index3{Z-index:3;Top:100px; Left:100px;Background-color:#090}</style></Head><Body><Divclass= "Index1">Index1</Div><Divclass= "Index2">Index2</Div><Divclass= "Index3">Index3</Div></Body></HTML>

In combination with the above code performance, the following conclusions can be drawn:
1. The Position property value of the object must be relative, absolute, or fixed.
Objects with large 2.z-index property values are located on objects with small Z-index property values.

The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=4702

For more information, refer to: http://www.softwhy.com/divcss/

What is the Z-index property of CSS for?

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.