
Z-index is a CSS property of an element that determines its position relative to other elements on the Z-axis. It applies only to elements with absolute
, fixed
, sticky
or relative
position (respectively, if the position property is not set to one of these values, adding z-index doesn’t affect the position of an element).