我有一张很大的图片,作为网站的背景:
body {
background: #000 url(/assets/img/living.jpg) no-repeat center center;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
height:100%;
}
但是在我的移动设备上(iPhone 4S - Safari),background-attachment: fixed
没有像桌面端那样产生相同的效果。这是为什么?我能使用媒体查询来解决吗?
background-attachment: fixed
。请查看https://dev59.com/YnA75IYBdhLWcg3w8-LZ。 - gaynorvader