IE6支持position:fixed最完美方案

关于ie6的position:fixed bug的解决办法。文章于2007年23月27日 发布在http://www.12px.net
IE7已经支持position:fixed了,而我们的IE6呢?还继续使用js事件?消耗资源,破坏结构,画面闪耀。 今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈 程序代码 ie-stuff.css 程序代码 #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); }

相关文章