<html>
<head>
<style>
#footer {
border-top: 1px solid #111;
color: #eee;
background: #2B2729;
padding: 5px;
text-align: center;
font-size: 0.9em;
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, Arial, sans-serif;
position: fixed;
bottom: 0;
width: 770;
left: 50%;
margin-left: -385px;
}
</style>
<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]><style>
#footer {
position: absolute;
bottom: auto;
clear: both;
top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
+(documentElement.clientHeight-this.clientHeight) - 1
: document.body.scrollTop
+(document.body.clientHeight-this.clientHeight) - 1);
}
</style><![endif]-->
</head>
<body>
IE7已经支持position:fixed了,而我们的IE6呢?还继续使用js事件?消耗资源,破坏结构,画面闪耀。
今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<!-- begin footer -->
<div id="footer">
joker
</div>
</body>
</html>
http://bbs.blueidea.com/thread-2781970-1-1.html
<head>
<style>
#footer {
border-top: 1px solid #111;
color: #eee;
background: #2B2729;
padding: 5px;
text-align: center;
font-size: 0.9em;
font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, Arial, sans-serif;
position: fixed;
bottom: 0;
width: 770;
left: 50%;
margin-left: -385px;
}
</style>
<!-- compliance patch for microsoft browsers -->
<!--[if lt IE 7]><style>
#footer {
position: absolute;
bottom: auto;
clear: both;
top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
+(documentElement.clientHeight-this.clientHeight) - 1
: document.body.scrollTop
+(document.body.clientHeight-this.clientHeight) - 1);
}
</style><![endif]-->
</head>
<body>
IE7已经支持position:fixed了,而我们的IE6呢?还继续使用js事件?消耗资源,破坏结构,画面闪耀。
今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<p>测试
<!-- begin footer -->
<div id="footer">
joker
</div>
</body>
</html>