您的位置:首页 > 其它

IE6支持position:fixed完美解决方法

2008-09-15 00:00 851 查看
今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈

<!-- compliance patch for microsoft browsers --> 
<!--[if lt IE 7]><link rel="stylesheet" href="ie-stuff.css" type="text/css" media="screen"/><![endif]-->


ie-stuff.css

#footer { 
position: absolute; 
bottom: auto; 
clear: both; 
top:e­xpression(eval(document.compatMode && 
document.compatMode=='CSS1Compat') ? 
documentElement.scrollTop 
+(documentElement.clientHeight-this.clientHeight) - 1 
: document.body.scrollTop 
+(document.body.clientHeight-this.clientHeight) - 1); 
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: