position:fixed 兼容浏览器低版本
生活随笔
收集整理的這篇文章主要介紹了
position:fixed 兼容浏览器低版本
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
項目中遇到的坑,寫篇博客做個筆記紀念下,position:?fixed一般來說都兼容各個瀏覽器,但是要兼容瀏覽低版本問題,就得用-webkit-transform: translateZ(0);這段代碼了。
項目中用到position:?fixed;z-index: xxx;的時候,記得加上這個css:-webkit-transform:?translateZ(0);????這個兼容position:fixed瀏覽器低版本????不然會有瀏覽器滾動出現閃爍bug。當然這里透明度opacity: 0.9;
也要做兼容的,這里就不具體做解釋了。 .footer_main{position: fixed;height: 150px;background: url(/static/web-v2.0/images/ad/IT/IT_footer.png) no-repeat top center;width: 100%;left: 0;bottom: 0;z-index: 9;opacity: 0.9;-webkit-transform: translateZ(0); }
也要做兼容的,這里就不具體做解釋了。 .footer_main{position: fixed;height: 150px;background: url(/static/web-v2.0/images/ad/IT/IT_footer.png) no-repeat top center;width: 100%;left: 0;bottom: 0;z-index: 9;opacity: 0.9;-webkit-transform: translateZ(0); }
總結
以上是生活随笔為你收集整理的position:fixed 兼容浏览器低版本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 视觉表现理论知识
- 下一篇: HTML基础知识(未完待续)