.bigbox { width:600px; height:600px; margin:20px auto; position:relative; background:linear-gradient(to bottom,#00a8ff,#cccccc); } .box1,.box2,.box3 { position:absolute; background:#ffffff; transition:0.5s ease; text-align:center; line-height:100px; border-radius:10px; } .box1 { width:300px; height:300px; top:150px; left:150px; z-index:3; } .box2 { opacity:0.8; width:200px; height:200px; top:100px; left:200px; z-index:2; } .box3 { opacity:0.5; width:100px; height:100px; top:50px; left:250px; z-index:1; }