CSS z index Property
CSS z-index Property
The z-index property is used to specify the stack order of an element. An element with greater stack order is always in front of an element with a lower stack order. It is only usable on positioned elements.
Default Value:-
Its default value is auto.
Syntax:-
Its syntax is:- z-index: auto | number | initial | inherit;
Further Explanation:-
Value | Description |
---|---|
auto | Sets the stack order equal to its parents. |
number | Sets the stack order of the element. |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |