您好,欢迎访问一九零五行业门户网

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); }
以上就是position:fixed如何兼容浏览器低版本的详细内容。
其它类似信息

推荐信息