沒用float,才絕對定位也是可以的嗎?
我沒有用float,我用的絕對定位。也能實現這樣的要求,是可以用的嗎?
<style type="text/css">
body{margin:0;padding:0;}/*清除一下默認樣式*/
.top{height:100px;background:blue;}
.main{width:800px;height:700px;background:#ccc;margin:0 auto}
.right{width:300px;height:700px;background:#0066CC;position:absolute;}
.left{width:500px,height:700px;background:#00FF33;postion:absolute;}
.foot{width:800px;height:100px;background:#900;margin:0 auto}
</style>
2016-09-05
去DW試了下你的代碼并不能實現題目要求,想要用absolute也是可以的 但你只空寫一個position:absolute是沒辦法實現的