Layer Z-Index
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.main{
width: 500px;
height: 500px;
border: solid 2px;
position: relative;
}
.div1{
width: 400px;
height: 400px;
background: red;
position: absolute;
left: 40px;
top: 40px;
}
.div2{
width: 400px;
height: 400px;
background: green;
position: absolute;
top: 20px;
left: 20px;
/* z-index: 1; */
}
.div3{
width: 400px;
height: 400px;
background: blue;
position: absolute;
}
</style>
</head>
<body>
<div class="main">
<div class="div1">
</div>
<div class="div2">
</div>
<div class="div3">
</div>
</div>
</body>
</html>
Comments
Post a Comment