The best CSS z-index property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,
Set the image of z-index:
z-index attribute specifies the stacking order of elements.
Element has a higher stacking order will always be in front of the lower stacking order of elements.
Note: z-index positioning element (position: absolute, position: relative , or position: fixed).
Defaults: | auto |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.zIndex = "1" |
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
z-index | 1.0 | 4.0 | 3.0 | 1.0 | 4.0 |
value | description |
---|---|
auto | default. The stacking order of the parent element are equal. |
number | Set the stacking order of elements. |
inherit | Provisions should inherit the z-index attribute value from the parent element. |
CSS tutorial: CSS Positioning