移动端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;}

 

上一篇:前端5-css背景


下一篇:10分钟理解CSS3 Grid布局