Docs / Z-Index

Z-Index

vel-src: layout.css

Utilities for controlling the stack order of an element.

ClassProperties
vel-z-0z-index: 0
vel-z-10z-index: 10
vel-z-20z-index: 20
vel-z-30z-index: 30
vel-z-40z-index: 40
vel-z-50z-index: 50
vel-z-autoz-index: auto

Examples

Z-index stacking

z-10
z-20
z-30
example.html
<div class="vel-relative" style="height:100px">
  <div class="vel-absolute vel-z-10 vel-bg-primary vel-text-white vel-rounded-lg vel-flex vel-items-center vel-justify-center" style="left:0;top:0;width:80px;height:80px;font-size:12px">z-10</div>
  <div class="vel-absolute vel-z-20 vel-bg-success vel-text-white vel-rounded-lg vel-flex vel-items-center vel-justify-center" style="left:40px;top:10px;width:80px;height:80px;font-size:12px">z-20</div>
  <div class="vel-absolute vel-z-30 vel-bg-danger vel-text-white vel-rounded-lg vel-flex vel-items-center vel-justify-center" style="left:80px;top:20px;width:80px;height:80px;font-size:12px">z-30</div>
</div>