我的背景图片在iOS设备上没有显示,它变灰了。
我不能在windows上测试它,也负担不起每10秒上传一个新的补丁。
我在网上找到了很多不同的答案,我已经试过了,但没有一个对我有效。
下面是我的CSS代码:
.img-bg-index {
background-image: url("../img/Monteurzimmer-BG.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center right;
background-size: cover;
min-height: 95vh;
position: relative;
}发布于 2017-01-30 17:05:13
后台连接导致了这个问题,似乎在safari浏览器中被禁用了:
How to replicate background-attachment fixed on iOS
我使用了媒体查询,并在某个max-width上将background-attachment更改为initial:
@media ( max-width :856px) {
.img-bg-index {
background-attachment: initial;
}
}https://stackoverflow.com/questions/41932039
复制相似问题