移动端背景图自适应

 

/*兼容安卓手机没有高度导致无法显示背景图片*/
html,body{
  width:100%;
  height:100%;
}
body {
  background: url(../../image/download.jpg);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-background-size: 100% 100%;
  background-attachment: fixed;
  -webkit-background-attachment: fixed;
}

 

转载于:https://www.cnblogs.com/llcdxh/p/9878688.html

你可能感兴趣的:(移动端背景图自适应)