Input
Output
<!DOCTYPE html> <html lang="en"> <head> <style>div { position: relative; width: 200px; height: 200px; } .box1 { background-color: red; z-index: -1; /* This box will be behind other elements */ } .box2 { background-color: blue; z-index: 1; /* This box will be on top */ } </style> </head> <body> <div class="box1">Box 1 (Front)</div> <div class="box2">Box 2 (Back)</div> </body> </html>