刚才写少了两个,这个才对
.top{height:100px;background:#ccc;}
.main{height:600px;background:red;margin:0 auto;position:relative;}
.left{height:600px;width:200px;background:#00f;position:absolute;left:0;top:0;}
.right{height:600px;margin-left:210px;background:#1d9;}
.foot{height:50px;background:orange;}
.top{height:100px;background:#ccc;}
.main{height:600px;background:red;margin:0 auto;position:relative;}
.left{height:600px;width:200px;background:#00f;position:absolute;left:0;top:0;}
.right{height:600px;margin-left:210px;background:#1d9;}
.foot{height:50px;background:orange;}
<style>
.top{height:100px;background-color:blue;}/*没宽:通栏*/
.foot{width:800px;height:100px;background-color:#900;margin:0 auto;}/*没设置height,页脚先手出不来*/
body{margin:0;padding:0;}
.main{width:800px;height:300px;background-color:#ccc;margin:0 auto;}/*没宽高,显示出不来*/
</style>
<body>
<div class="foot"></div>
.top{height:100px;background-color:blue;}/*没宽:通栏*/
.foot{width:800px;height:100px;background-color:#900;margin:0 auto;}/*没设置height,页脚先手出不来*/
body{margin:0;padding:0;}
.main{width:800px;height:300px;background-color:#ccc;margin:0 auto;}/*没宽高,显示出不来*/
</style>
<body>
<div class="foot"></div>