B.131. z-index
For any element for which the position property is other than static, this property sets the stacking order relative to other positioned elements within the same stacking context[17].
[17] The stacking context of any element is the closest positioned ancestor whose z-index property is set.
Non-positioned elements are always beneath all positioned elements in the same stacking context; they effectively have a z-index of 0. Elements in the same stacking context with the same z-index are stacked in the order they appear in the document, with later elements overlaying earlier ones.
Inherited: No
See also: Section B.90position
B.131.1. Value
A positive integer, or the auto constant. The higher the integer, the higher the element's ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access