<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>固定定位</title>
<style>
#box{
width: 800px;
height: 1600px;
background-color: #ff0000;
margin: 0 auto;
margin-top: 44px;
}
.ad_l{
width: 120px;
height: 288px;
position: fixed;
top: 100px;
left: 20px;
}
.ad_r{
width: 120px;
height: 288px;
position: fixed;
top: 100px;
right: 20px;
}
.top{
width: 100%;
height: 44px;
position: fixed;
top: 0;
left: 0;
}
</style>
</head>
<body>
<img class="top" src="../images/top.png" alt="">
<img class="ad_l" src="../images/ad_l.png" alt="">
<div class="ad_r" id="box">
<img src="../images/box.png" alt="">
</div>
</body>
</html>