.top{width:auto;background:#ccc;height:100px;}
.main{background:#f00;height:600px;}
.left{ background:blue;width:200px;height:600px; float:left;}
.right{background:green;height:600px; position:absolute;right:0px; left:210px;}
.foot{height:100px;width:auto; clear:both;background:#ccc;}
.main{background:#f00;height:600px;}
.left{ background:blue;width:200px;height:600px; float:left;}
.right{background:green;height:600px; position:absolute;right:0px; left:210px;}
.foot{height:100px;width:auto; clear:both;background:#ccc;}
最赞回答 / 梦灵花儿
.right { height: 500px; background-color: aquamarine; margin-left: 210px; position:absolute;/*脱离文档流,但是 display:inline-block,所以加个宽度 */ width:100%;/*这样就满足自适应了*/ }
2015-06-13
给的答案不对吧, css:
.top{height:100px; background:#ccc}
.main{position:relative}
.left{position:absolute;top:0;left:0; width:200px; height:500px; background:blue; }
.right{ margin-left:210px;height:500px; background:#9C9;}
.foot{ height:50px; background:#F63 }
.top{height:100px; background:#ccc}
.main{position:relative}
.left{position:absolute;top:0;left:0; width:200px; height:500px; background:blue; }
.right{ margin-left:210px;height:500px; background:#9C9;}
.foot{ height:50px; background:#F63 }