<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> *{ margin:0; padding: 0; } .big{ padding: 0 200px 0 100px; height: 800px; background: red } .box1{ height: 300px; width: 100%; background: green; } .box2{ width: 100px; height: 100px; background: yellow; margin-left: -100%; position: relative; left: -100px } .box3{ width: 200px; height: 200px; background: pink; margin-left: -200px; position: relative; left: 200px } .big>div{ float: left; } </style> </head> <body> <div class="big"> <div class="box1"></div> <div class="box2"></div> <div class="box3"></div> </div> </body> </html>
圣杯布局
最新推荐文章于 2022-11-28 10:28:14 发布