Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!doctype html> <title>Example</title> <style> #grid { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; height: 90vh; background-color: beige; } .red { background: orangered; z-index: 3; } .green { background: yellowgreen; position: relative; left: -20vw; top: 20vh; z-index: 1; } .blue { background: steelblue; position: relative; left: -40vw; top: 5vh; z-index: 2; } #grid > div { padding: 20px; font-size: 4vw; color: white; } </style> <div id="grid"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div>
Preview