IE6 css fixed

來源:互聯網
上載者:User
.fixed-top{position:fixed;bottom:auto;top:0px;}.fixed-bottom{position:fixed;bottom:0px;top:auto;}.fixed-left{position:fixed;right:auto;left:0px;}.fixed-right{position:fixed;right:0px;left:auto;}/* IE6 */* html,* html body{background-image:url(about:blank);background-attachment:fixed;}* html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}* html .fixed-right{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft+document.documentElement.clientWidth-this.offsetWidth)-(parseInt(this.currentStyle.marginLeft,10)||0)-(parseInt(this.currentStyle.marginRight,10)||0));}* html .fixed-bottom{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));}* html .fixed-left{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}

備忘一下,經常想用的時候都得查!!!

相關文章

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.