最新回答 / 赵小刀丝儿
可以。.main需要设定宽度,中间部分的左右模块分别加左右浮动即可.main { background: red; width: 100%; height: 300px; } .left { background: blue; width: 200px; height: 300px; float: left; } .right { backgr...
2017-01-17
.top{width:100%;background:gray;height:50px;}
.main{width:100%height:500px;background:red;}
.left{ width:200px;height:500px;float:left;background:blue;}
.right{height:500px;float:right;background:green;}
.foot{width:100%;height:50px;background:#369;}
为 这样写中间会有一片空白啊
.main{width:100%height:500px;background:red;}
.left{ width:200px;height:500px;float:left;background:blue;}
.right{height:500px;float:right;background:green;}
.foot{width:100%;height:50px;background:#369;}
为 这样写中间会有一片空白啊
.top{height:100px; background:gray;}
.main{width:100%;height:400px;background:red; }
.left{ width:200px;height:400px;background:blue;position: absolute;left: 0;top:100px;}
.right{height:400px;background:green;margin-left:210px;}
.foot{height:100px; background:orange;clear:both;}
.main{width:100%;height:400px;background:red; }
.left{ width:200px;height:400px;background:blue;position: absolute;left: 0;top:100px;}
.right{height:400px;background:green;margin-left:210px;}
.foot{height:100px; background:orange;clear:both;}
.top,.main,.foot,.right{width:100%;}
.top{height:100px; background:#ccc; }
.main{height:600px; background:red; }
.left{width:200px; height:600px;background:blue;position:absolute;left:0;}
.right{height:600px; background:#79cbb0;position:absolute;left:210px;}
.foot{height:60px; background:#ee873b;}
.top{height:100px; background:#ccc; }
.main{height:600px; background:red; }
.left{width:200px; height:600px;background:blue;position:absolute;left:0;}
.right{height:600px; background:#79cbb0;position:absolute;left:210px;}
.foot{height:60px; background:#ee873b;}