Correction status:qualified
Teacher's comments:下次要写作业标题 , 注意, 不要这样应付
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>固定定位案例</title>
<style>
body{
background: url("static/images/1.png");
background-repeat: no-repeat;
}
#box2 img{
width: 180px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -90px;
margin-top: -100px;
}
#box1{
width: 100%;
height: 1800px;
background: #000;
opacity: 0.7;
}
</style>
</head>
<body>
<div id="box1">
<div id="box2">
<img src="static/images/2.png" alt="">
</div>
</div>
</body>
</html>