我的正文背景图片最初看起来被截断了,刷新后正确显示。
body {
background-position: center;
background-image:url(../interface_images/assessment/genericbackgroundx.gif);
background-repeat: no-repeat;
background-size: cover;
-o-background-size: cover;
-moz-background-size: cover;
-webkit-background-size:cover;
background-attachment: scroll;
}
我将图像转换为 .gif,但这并不能解决问题。 有没有办法来解决这个问题?
最佳答案
将 background-attachment 值更改为 fixed。
- 使用“滚动”(默认)- 背景图像将随着 页。
- 使用“固定”- 背景图像不会随着 页。
- With "local"- 背景图像将随着 元素的内容
你可以阅读更多here
关于html - 背景图片仅在 ipad 上的 safari 刷新时出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54944820/