Specifies the stack level of positioned objects.
This element is useful if you want to create overlapping elements, like dialogs, tooltips or banners. Elements with the same z-index are stacked back-to-front according to HTML flow. The children of a stacked element are at the same stack level, if you want to use some overlap between them, you can use a minimum index of 0.
One of the following values:
|Default. Determines the stacking order of the positioned element automatically based on its order in the document.|
|Takes the value of this property from the computed style of the parent element.|
|Integer that specifies the stack level.|
Example HTML code 1:
This example illustrates the use of the z-index property:
Did you find this example helpful?
Supported by tags:
User Contributed Comments