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.
|Applies to||positioned elements|
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.