IE6支援position:fixed完美解決方案_經驗交流

來源:互聯網
上載者:User
今天去一老外站看到了這他站上的十分平滑但卻沒有js,好奇,原來。。巧妙啊,分享下,相對而言比較節省資源。但效果好,使用方便,兼顧w3c。哈哈

複製代碼 代碼如下:




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);
}
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.