我在 HTML 页面上添加了背景图像。我希望它能够在所有屏幕尺寸和缩放(放大/缩小)上固定。
这是解决问题的笔: LINK
CSS 是:
body {
color: #fff;
background: url("http://cdn.wonderfulengineering.com/wp-content/uploads/2016/01/Live-Wallpaper-1.jpeg");
background-size: cover;
background-repeat: no-repeat;
}
告诉我应该如何处理:) xD
最佳答案
添加此:
background-attachment: fixed;
background-position: center;
关于html - 如何在调整大小和缩放时修复背景图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37675297/