您的位置:首页 > 其它

IE6 重绘bug

2012-03-07 11:05 134 查看
<!DOCTYPE HTML>
<html>
<head>
<link href="http://a.tbcdn.cn/??tbsp/tbsp.css" rel="stylesheet">
<style type="text/css">
li {
width:300px;
height:30px;
}
li.fuck {
position:fixed;/*IE6下 fixed定位的结点会阻止他以及他以后的块级结点发生重绘*/
}
</style>
</head>

<body>
<ul>
<li style="background:green;" id="first" >1111111111111111111111</li>
<li style="background:red;" class="fuck" >222222222222</li>
<li style="background:yellow;">333333333333</li>
<li style="background:#aaa;display:inline;zoom:1">4444444444444444444444444</li>
<li style="background:#999;display:inline">5555555555555555</li>
</ul>

<script>
document.onclick = function () {
document.getElementById('first').style.height = '400px';
}
</script>
</body>
</html>


IE6下 fixed定位的有haslayout结点会阻止他以及他以后的haslayout结点发生reflow
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: