细数逝去的过往

导航

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);
}

 

posted on 2017-09-27 11:54  细数逝去的过往  阅读(478)  评论(0)    收藏  举报