<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
为什么在移动版本中全屏背景图像模糊(仅在设备上。)?我该如何解决这个问题?
最佳答案
图像模糊是因为它们有 background-attachment: fixed。此属性将图像拉伸(stretch)到整个窗口大小,因此在移动设备上它们看起来是模糊的。要解决此问题,请尝试设置 background-attachment: fixed from a specific size。例如:
.class-with-background{
@media (min-width: /* size to apply the fixed background */){
background-attachment: fixed;
}
}
通过使用此 CSS 代码,您在浏览器上查看时不会丢失图像的任何部分
关于html - 为什么在移动版全屏背景图像模糊?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38375390/
相关文章:
javascript - 垂直对齐居中图像旁边的多行文本响应
css - 在 Bootstrap Gallery 中使图像变大
css - 在 Angular 2 组件中使用 Jquery ui slider 时闪烁
jquery - 如何使用 html css 和 jquery 在蒙版或剪辑下对图像进行动画处理?
javascript - 如何将颜色 'Clear'设置为RGB或HEX?
twitter-bootstrap - 如何使用 SVG 对象显示 Bootstrap 工具提示?
css - "float: right;"与 "float: left; margin-left: Ypx"对于 2 列布局,最佳做法是什么?