CSS Layers

You can create layers of various divison. The CSS layers refer to applying the z-index property to elements that overlap with each other.

The z-index property is used along with the position property to create an effect of layers. You can specify which element should come on top and which element should come at bottom.

<style type="text/css">
  .layers-1 {
    width: 80px;
    height: 100px;
    position: relative;
  .infront {
    background-color: red;
    top: 10px;
    left: 80px;
    z-index: 2;
  .behind {
    background-color: gold;
    top: -60px;
    left: 35px;
    z-index: 1;
    <div class="infront layers-1"></div>
    <div class="behind layers-1"></div>