<!DOCTYPE html><html lang="en"><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></head><style> .box { width: 1500px; height: 1200px; } .box1 { width: 1500px; height: 100px; background-color: silver; float: left; } .box2 { width: 250px; height: 600px; background-color: orange; float: left; } .box3 { width: 1000px; height: 600px; background-color: lightcoral; float: left; } .box4 { width: 100px; height: 300px; background-color: lime; position: fixed; left: 120px; top: 150px; } .box5 { width: 100px; height: 300px; background-color: lime; position: fixed; left: 1370px; top: 150px; }</style><body> <div class="box"> <div class="box1">头部内容</div> <div class="box2">左侧边栏 <div class="box4">左侧广告</div> </div> <div class="box3">主体内容</div> <div class="box2">右侧边栏 <div class="box5">右侧广告</div> </div> <div class="box1">底部内容</div> </div></body></html>