The z-index property specifies the stack order of an element.
An element with greater stack order is always in front of an element with a lower stack order. z-index only works on positioned elements (absolute, relative, fixed or sticky) and flex items (elements that are direct children of flex elements).
.z0 { z-index: 0; } .z1 { z-index: 1; } .z2 { z-index: 2; } .z3 { z-index: 3; } .z4 { z-index: 4; } .z999 { z-index: 999; } .z9999 { z-index: 9999; } .z-max { z-index: 2147483647; }