IE6 fixed解决方案

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> WebPage </title>
   <meta name="Author" content="zhuoyr">
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
</head>
<body>
<style type="text/css">
<!--
body{_background:url(about:blank) fixed;/*防止ie6下闪动,背景可随意*/}
.zhuo{ position:fixed; _position:absolute; left:100px; top:300px; background: #090; width: 100px; height: 100px; }
* html .zhuo{ position:absolute; top:expression(eval(document.documentElement.scrollTop+300));}
//-->
</style>
<div class="zhuo"></div>
<script  type="text/javascript">
<!--
  for( var i = 0 ; i< 100 ; i++ ){ document.write('<p>abc'); }
//-->
</script>
</body>
</html>

你可能感兴趣的:(fixed)