时间:2021-07-01 10:21:17 帮助过:63人阅读
项目中用到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如何兼容浏览器低版本的详细内容,更多请关注Gxl网其它相关文章!