.main{width:800px; margin:0 auto; background:red; position:relative;}
.left{width:30%; height:700px; background:blue; position:absolute; float:left;}
.right{width:65%; height:700px; background:green;position:absolute; right:0;}
.foot{width:800px; height:150px; background:yellow; margin:0 auto;}
.left{width:30%; height:700px; background:blue; position:absolute; float:left;}
.right{width:65%; height:700px; background:green;position:absolute; right:0;}
.foot{width:800px; height:150px; background:yellow; margin:0 auto;}
.top{background:green;height:50px;width:100%;}
.main{height:500px;width:100%;background:red;position:relative;}
.left{width:29%;height:100%;float:left;background:blue;}
.right{width:70%;height:500px;position:absolute;background:black;right:0px;}
.foot{background:orange;height:30px;width:100%;}
.main{height:500px;width:100%;background:red;position:relative;}
.left{width:29%;height:100%;float:left;background:blue;}
.right{width:70%;height:500px;position:absolute;background:black;right:0px;}
.foot{background:orange;height:30px;width:100%;}
body{ margin:0; padding:0; font-size:30px; color:#fff}
.top{height:100px;background:#9CF;}
.main{height:600px;background:red;}
.left{width:200px; height:600px;background:blue;float:left;}
.right{height:600px;background:green;float:right;}
.foot{height:50px;background:yellow;}
定位用float也没问题吧
.top{height:100px;background:#9CF;}
.main{height:600px;background:red;}
.left{width:200px; height:600px;background:blue;float:left;}
.right{height:600px;background:green;float:right;}
.foot{height:50px;background:yellow;}
定位用float也没问题吧
.main{width:960px;height:600px;margin:0 auto;background:#9FC;}
.top{height:100px;width:;background:gray;}
.main{height:400px;background:red;position:relative;}
.left{height:400px;width:200px;background:pink; }
.right{height:400px;width:100%;background:green;position:absolute;top:0;left:210px;}
.foot{height:50px;background:black;}
.main{height:400px;background:red;position:relative;}
.left{height:400px;width:200px;background:pink; }
.right{height:400px;width:100%;background:green;position:absolute;top:0;left:210px;}
.foot{height:50px;background:black;}
要求右侧(right)先加载,左侧(left)后加载: <div class="right">right</div>在
<div class="left">left</div>前面就可以实现了,不需要多加修改
<div class="left">left</div>前面就可以实现了,不需要多加修改
.top{margin:0 auto;background-color:gray;}
.main{position:relative;height:800px;background-color:red;}
.left{ width:200px;position:absolute;left:0;top:0;height:800px;background-color:blue;}
.right{float:right;height:800px;background-color:green;}
.foot{margin: 0 auto;background-color:orange;}
.main{position:relative;height:800px;background-color:red;}
.left{ width:200px;position:absolute;left:0;top:0;height:800px;background-color:blue;}
.right{float:right;height:800px;background-color:green;}
.foot{margin: 0 auto;background-color:orange;}