5-3變成挑戰
幫我看看,錯了的幫我改正,謝謝了?。ㄔ鯓邮箁ight先加載?怎么兼容ie6?)
body{ margin:0; padding:0; _padding:0;font-size:30px; color:#fff}.top{width:100%;height:100px;background:#ccc;}
.main{width:100%; height:500px;background:red;margin:0 auto; position:relative;overflow:hidden;}
.left{width:200px;height:500px;background:blue;float:left;left:0;top:0;}
.right{width:100%;height:500px;background:green;position:absolute;margin:0 0 0 210px;}
.foot{width:100%;background:yellow;padding:0;clear:both;}
2016-11-12
首先,答案有很多種,很簡潔的如下
.top{height:100px;background:#ccc;}
.main{height:500px;background:red;}
.left{width:30%;height:500px;background:blue;float:left;}
.right{width:65%;height:500px;background:green;float:right;}
.foot{height:100px;background:yellow;}
width:100%;這玩意有必要嗎?
全寬的情況下margin:0 auto;居中有必要嗎?
left right放一列,你right?width:100%這是啥,俺問你?
自己不是很懂得代碼別亂寫,沒用的也少些行不?
!important試試這個,看能否優先加載,我沒試啊
2016-11-16
因為這個就不是要滿足左邊固定寬,右邊自適應啊,實現的是左右之間有間隔的,間隔顯示背景顏色的。