混合布局

<body>
<div class="top">top</div>
<div class="main">
    <div class="right">right</div>
    <div class="left">left</div>
</div>
<div class="foot">foot</div>

</body>
body{ margin:0; padding:0; font-size:30px; color:#fff}
.top{width:960px;height:50px; margin:0 auto;background:#ccc;}
.main{width:960px;height:300px; margin:0 auto;background:red;}
.left{width:200px;height:300px;background:blue;position:absolute; left:0; top:50px}
.right{height:300px;margin:0 0 0 210px;background:green;}
.foot{width:960px; margin:0 auto; height:40px; background:orange;}

 

posted @ 2016-09-20 21:47  上官靖宇  阅读(156)  评论(0编辑  收藏  举报