手机端背景图片撑满整个屏幕
请看:https://blog.csdn.net/wuli_youhouli/article/details/111304892
HTML设置一个空div,用来放置背景图片。
<body> <div class=“main”></div> </body>
高度100%
html,body{ margin:0; height:100%; } .main{ height:100%; background:url('./bg.png') no-repeat ; }
高度100vh
.main{ height:100vh; width:100vw; background:url('./bg.png') no-repeat ; }