已采纳回答 / 慕粉3549382
我重新测试了下 发现我前面说的有误 我说的关于为什么left会在main之外是正确的 后半部分错误实际上 left算是处于main所在区域 只是显示的时候显示在下面了(因为被right独占一行) 那么 既然left不存在 ,foot实际上显示出来是与foot重叠的(文字部分就已经重叠了) 。之所以你测试和我的测试结果之前都显示不重叠,因为那是设计窗口,当把代码保存之后,或者使用实时窗口就会发现 foot和left重叠
2016-06-24
.top{height:100px;background:gray;}
.main{height:600px;position:relative;}
.left{width:200px;position:absolute;background:blue;height:100%;border-right:10px solid red;}
.right{position:absolute;left:210px;height:100%;background:green;width:100%}
.foot{background:orange;height:100px;}
.main{height:600px;position:relative;}
.left{width:200px;position:absolute;background:blue;height:100%;border-right:10px solid red;}
.right{position:absolute;left:210px;height:100%;background:green;width:100%}
.foot{background:orange;height:100px;}