Z-Index
Set the stack order for an element.
Widely available
This feature is well established and works across many devices and browser versions.
Chrome
Edge
Firefox
Safari
zi-0z-index: 0;zi-10z-index: 10;zi-20z-index: 20;zi-30z-index: 30;zi-40z-index: 40;zi-50z-index: 50;zi-60z-index: 60;zi-70z-index: 70;zi-80z-index: 80;zi-90z-index: 90;zi-9999z-index: 9999;zi-autoz-index: auto;Responsiveness
Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.
Target viewport sizes with breakpoint prefixes.
sm:zi-(value)Small≥640px
md:zi-(value)Medium≥768px
lg:zi-(value)Large≥1024px
xxl:zi-(value)Extra Large≥1536px
Hover State
Apply styles conditionally on hover using the h: prefix.
Add the h: prefix to apply styles only when the user hovers over the element.
Syntax:
h:zi-(value)Negative Values
Use negative variants to apply negative z-index values.
Use the -- syntax to apply negative numeric values.
Syntax:
zi--(value)