ie6 position fixed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
body{height:2000px;}
a{text-decoration:none;}
#top{width:60px;height:60px;background:#ccc;position:fixed;bottom:30px;right:30px;font:12px/60px 宋体;text-align:center;cursor:pointer;color:#666;}
#top:hover{background:#181818;color:#fff;}
</style>
<!--[if lte IE 6]>
<style type='text/css'>
body{background:url(null) fixed;}
#top{position:absolute;top:expression(parseInt(document.documentElement.clientHeight-90+document.documentElement.scrollTop));}
</style>
<![endif]-->
</head>

<body>
<a href="#" id="top" onclick="window.scrollTo(0,0);return false;">返回顶部</a>
</body>
</html>

其实现在真的可以无视IE6了吧,唉,这恶心的expression,就记一下吧,备忘。。。

原文地址:https://www.cnblogs.com/hejia/p/2881947.html