背景图片的phonex的适配


背景图片的phonex的适配

1
2
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=auto">
  • background 是 top center
1
2
3
4
5
6
7
8
9
10
11
<style type="text/css">
html,body{
width:100%;
height:100%
}
body{
background: url(bg.jpg) no-repeat top center;
background-size: cover;
}
*{ margin:0px; padding:0px;}
</style>