新聞中心
這篇文章主要介紹“IE6中的position:fixed定位兼容性寫法教程”,在日常操作中,相信很多人在IE6中的position:fixed定位兼容性寫法教程問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”IE6中的position:fixed定位兼容性寫法教程”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!
廬江網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián)建站,廬江網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為廬江超過千家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請找那個售后服務(wù)好的廬江做網(wǎng)站的公司定做!
代碼如下:
/* 修正IE6振動bug */
html,* html body{background-image:url(about:blank);background-attachment:fixed;}
/* IE6 頭部固定 */
html .fixed-top{position:absolute;bottom:auto;top:expression(eval(document.documentElement.scrollTop));}
/* IE6 右側(cè)固定 */
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));}
/* IE6 底部固定 */
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)));}
/* IE6 左側(cè)固定 */
* html .fixed-left{position:absolute;right:auto;left:expression(eval(document.documentElement.scrollLeft));}
到此,關(guān)于“IE6中的position:fixed定位兼容性寫法教程”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!
名稱欄目:IE6中的position:fixed定位兼容性寫法教程
文章位置:http://www.dlmjj.cn/article/jssocd.html