<div class="w3tr">w3tr</div>
<div class="z0">z0</div>
<div class="z1">z1</div>
<div class="z2">z2</div>
div{
  position: absolute;
  background: red;
  width: 100px;
  height: 100px;
}
.z0{
  z-index: 0;
  left: 20px;
  top: 30px;
  background: gray;
}
.z1{
  z-index: 1;
  left: 40px;
  top: 50px;
  background: yellow;
}
.z2{
  z-index: 2;
  left: 60px;
  top: 70px;
  background: orange;
}
.w3tr{
  z-index: auto;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.