Z Index Property of CSS
The z-index Property
When elements are positioned outside the normal flow, they can overlap other elements. The z-index property specifies the stack order of an element i.e, which element should come on top and which goes down. The higher z-index value will make the element appear on top of other elements which have low z-index values.
Syntax:-
Its syntax is:-
< style >
element{
z-index: auto| number| initial| inherit;
}
< /style >
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. |