ie6防抖动——ie6 fixed

采用以下方法可以在IE6上实现无抖动悬浮效果。

<!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>
<link href="../style.css" rel="stylesheet" type="text/css" />

<style type="text/css">
body {
    _background: url(about:blank) fixed;
	height:1500px;
}
/*或者使用如下代码*/
*html{
	 _background: url(about:blank) fixed;
}

.fixable {
    position:fixed;
    top:100px;
    _position:absolute;
    _top:expression((document).documentElement.scrollTop+100);
	width:300px;
	height:50px;
	border:1px solid red;
}
</style>
</head>
<body>
<div class="fixable">fixable</div>
</body>
</html>

具体可以参考博客: http://www.cnblogs.com/cloudgamer/archive/2010/10/11/AlertBox.html

posted @ 2013-01-03 17:22  djune  阅读(497)  评论(0编辑  收藏  举报