修正IE6中FIXED不能用的办法,转载
生活随笔
收集整理的這篇文章主要介紹了
修正IE6中FIXED不能用的办法,转载
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
.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 /* 修正IE6振動bug */{background-image:url(about:blank);background-attachment:fixed;} * html .fixed-top /* IE6 頭部固定 */{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));} * html .fixed-right /* IE6 右側固定 */ {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 /* IE6 底部固定 */{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 /* IE6 左側固定 */{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));} 這個代碼尚未進行測試,僅轉載以保留使用
總結
以上是生活随笔為你收集整理的修正IE6中FIXED不能用的办法,转载的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: DISCUZ中判断当前页是否是门户首页
- 下一篇: DISCUZ开启设计插件功能和显示嵌入点