如何修复调整大小和缩放背景图像?
问题描述:
我在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;
感谢frutis,神奇的工作;) – b0y
Np,很高兴帮助:) – Frutis