.container{
    position: relative;
    width: 100px;
    height: 100px;
}
.box{
    width: 100px;
    height: 100px;
}
.box1{
    background-color: red;


}
.box2{
    background-color: blue;
    z-index: 1;
    position: relative;
    left: 40px;
    top: -40px;
}
.box3{
    background-color: green; 
    position: relative;
    left: 80px;
    top: -80px;
}