为什么我的这个“box1”,“box2”,“box3”不偏移呢?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>relative</title>
<style type="text/css">
.box {
width:600px;
height:120px;
background: blue;
display:relative;
}
.box1,.box2,.box3{
width:50px;
height:40px;
display:absolute;
left:100px;
top:20px;
}
.box1 {
background: red;
}
.box2 {
background: orange;
}
.box3 {
background: green;
}
</style>
</head>
<body>
<div class="box">
<div class="box1">1</div>
<div class="box2">2</div>
<div class="box3">3</div>
</div>
</body>
</html>
display:relative; display:absolute;大哥 哪有这个属性?position才对