Layout
Set the stacking order of relative or absolute positioned elements.
Class | Styles |
---|---|
z-<number> | z-index: <number>; |
-z-<number> | z-index: calc(<number> * -1); |
z-auto | z-index: auto; |
Use the z-*
utilities to control the stack order (or three-dimensional positioning) of an element, regardless of order it has been displayed.
To use a negative z-index value, prefix the class name with a dash to convert it to a negative value.
By default, Tailwind provides six numeric z-index
utilities and an auto
utility. You can customize these values by editing theme.zIndex
or theme.extend.zIndex
in your tailwind.config.js
file.
Learn more about customizing the default theme in the theme customization documentation.