任务3:要求右侧(right)先加载,左侧(left)后加载 任务4:编写的代码要兼容ie6
在代码中哪里提现出来了任务3和4??
2016-03-17
<style type="text/css">
body{ margin:0; padding:0; font-size:30px; color:#fff}
.top{ height:50px;background:#222;}
.main{?}
.left{ width:100px;height:50px;background:#333;position:absolute;top:50px;}
.right{height:50px;margin:0 0 0 100px;background:#444;}
.foot{height:50px;background:#555;}
</style>
</head>
<body>
<div class="top">top</div>
<div class="main">
<div class="right">right</div>
<div class="left">left</div>
</div>
<div class="foot">foot</div>
</body>
完美
这一篇提到了ie6 对clear:both的问题:clear:both在(FF/IE8)和(IE6/IE7)下有差异
菜鸟个人见解:
先加载后加载应该指的是文档流和绝对定位元素的区别。
兼容ie6应该指的是clear:both一类的清除浮动的方法在ie6中并不兼容?
将浮动父元素指定高度应该可以兼容ie6吧,我也不太清楚。
推荐有关于浮动的文章:[转]那些年我们一起清除过的浮动
举报