/* background image and overlay */
body {
background: #212121 url("img/bg.jpg") no-repeat top center fixed;
background-size:cover;
**strong text**margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
网站:https://ejive2k18-07.firebaseapp.com/ - 宽屏工作完美但与移动视图不兼容。如果有人解决这个问题,将会很高兴!
如果您希望根据浏览器窗口的大小缩放相同的图像:
background-image:url('../images/bg.png');
background-repeat:no-repeat;
background-size:contain;
background-position:center;
Do not set width, height, or margins.