Z-index

Utilities for controlling the stack order of an element.

On this page
ClassProperties
.z-0z-index: 0;
.z-10z-index: 10;
.z-20z-index: 20;
.z-30z-index: 30;
.z-40z-index: 40;
.z-50z-index: 50;
.z-100z-index: 100;
.z-autoz-index: auto;
.z-dropdownz-index: 96;
.z-fixedz-index: 96;
.z-stickyz-index: 97;

Usage

Use .z-{index} to control the z-order (3D positioning) of an element and its descendants.

Variants

By default, no responsive or hover-state variants are generated for z-index utilities.

Responsive

To include responsive variants like .md:z-50, add "z-index" to the $responsive-variants variable in your theme’s _variables.scss file when recompiling your CSS:

$responsive-variants: (
  // ...
  "z-index",
);

Hover-state

To include hover-state variants like .hover:z-50, add "z-index" to the $hover-variants variable:

$hover-variants: (
  // ...
  "z-index",
);

Questions or feedback about this article? Let us know