.top{ width:100%;height:100px;background:#aaa;}
.main{ width:100%;background:red;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.main{ width:100%;background:red;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.top{ width:100%;height:100px;background:#aaa;}
.main{ width:100%;background:red;overflow:hidden;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.main{ width:100%;background:red;overflow:hidden;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.top{ width:100%;height:100px;background:#aaa;}
.main{ width:100%;background:red;overflow:hidden;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.main{ width:100%;background:red;overflow:hidden;position:relative;}
.left{ width:200px;height:400px;background:blue;}
.right{ height:100%;background:yellow;position:absolute;margin:0 0 0 210px;width:100%;}
.foot{ background:orange;clear:both;}
.top{margin:0 auto;background:gray;height:100px;}
.main{position:relative;background:red;height:300px;}
.left{ width:200px;height:300px;background:blue;float:left;}
.right{height:300px;position:absolute;left:210px;background:green;margin:0 auto;width:100%;}
.foot{margin:0 auto;background:pink;}
.main{position:relative;background:red;height:300px;}
.left{ width:200px;height:300px;background:blue;float:left;}
.right{height:300px;position:absolute;left:210px;background:green;margin:0 auto;width:100%;}
.foot{margin:0 auto;background:pink;}
body{ margin:0; padding:0; font-size:30px; font-weight:bold}
div{ line-height:50px}
.left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0}
.main{ height:600px; margin:0 310px 0 210px; background:#9CF}
.right{ height:600px; width:300px; position:absolute; top:
div{ line-height:50px}
.left{ width:200px; height:600px; background:#ccc; position:absolute; left:0; top:0}
.main{ height:600px; margin:0 310px 0 210px; background:#9CF}
.right{ height:600px; width:300px; position:absolute; top:
最赞回答 / lsnFor
清除浮动有以下三种方式:1.父元素清除浮动设置--->.box{overflow:hidden;}<div class="box"> <div class="left"></div> <div class="right"></div></div>2.浮动元素后添加空div清除浮动设置--->.clear{clear:both;}(通常情况both)<div class="left"></div...
2016-11-26