z-index

The z-order of a positioned element and its descendants or flex items is determined by the z-index CSS property. Those with a smaller z-index are covered by elements with a larger z-index.

Initial value auto
Applies to positioned elements

Syntax

  
z-index: 5;
  

Values

The target element does not establish a new local stacking context. The stack level of the target element is the same as the parent element.
This value is the stack level of the element in the current stacking context. The target element also establishes a local stacking context in which its stack level is 0. This basically means that the z-indexes of child elements are not compared to the z-indexes of elements outside this element.

Browser support

z-index1121441
negative_values1123441

We use cookies to improve your experience. Learn more in our Privacy policy.

×