移动端background-attachment:fixed不兼容处理

body { background:#000 url('../images/bg.jpg') no-repeat center top; background-size:cover; background-attachment:fixed;}
body:before {content:'';position:fixed;z-index:-1;top:0;right:0;bottom:0;left:0;background:#000 url('../images/bg.jpg') no-repeat center top;background-size: cover;}

 

posted @ 2021-01-07 16:53  十三月凉  阅读(778)  评论(0编辑  收藏  举报
/* 看板娘 */