<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>z-index(叠放)</title>
<style>
div{
position:absolute;
top:0;
left:0;
/*这个是默认为零的*/
/*z-index:0;*/
}
.c1{
width: 100px;
height: 100px;
background-color: #0000FF;
position: relative;
top: 100px;
right: 100px;
z-index: 10;
}
.c2{
width: 400px;
height: 400px;
background-color: #124444;
position:fixed;
top: 50px;
right: 50px;
}
.c3{
width: 100px;
height: 100px;
background-color: #8A2BE2;
}
</style>
</head>
<body>
<div class="c1">
</div>
<div class="c2">
</div>
<div class="c3">
</div>
</body>
</html>