<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scable=no">
<title>index</title>
<style>
div {
width: 100px;
height: 100px;
position: absolute;
}
div.x {
background-color: red;
top: 20px;
left: 200px;
z-index: 3;
}
div.y {
background-color: green;
top: 50px;
left: 260px;
z-index: 2;
}
div.z {
background-color: blue;
top: 80px;
left: 230px;
z-index: 1;
}
</style>
</head>
<body>
<!-- x가 가장 아래로 겹쳐져서 보여야 하나
z-index가 적용되어 x가 가장 위로 겹쳐짐 -->
<div class="x"></div>
<div class="y"></div>
<div class="z"></div>
</body>
</html>