我知道之前曾有人问过这个问题,但是我尝试过固定背景图片,但没有帮助。
You can view the problem here when you scroll down to the thumbnail gallery.
我真的不知道问题出在哪里,但是这里有一些令人不安的背景代码:
#content1 {
background: #395668 url(../img/studio-9.jpg) fixed no-repeat center;
padding-top: 120px;
padding-bottom: 120px;
}
#gallery {
background: url(../img/studio-8.jpg) fixed no-repeat center;
padding-top: 160px;
padding-bottom: 160px;
}
有什么线索吗?在Chrome中看起来不错,在Firefox中看起来不错。
最佳答案
不幸的是,这与您的编码无关,而是与浏览器本身有关,因为Safari对鼠标滚动的反应与Firefox和Chrome完全不同。
Firefox和Chrome浏览器会在整个滚动过程中跟踪鼠标的滚动,这就是使Parallax有效的原因。
但是,使用Safari时,直到用户完成滚动时,鼠标滚动位置才会更新,这会引起抖动效果。
唯一的选择是为Safari用户禁用视差效果。
关于javascript - Stellar.js视差元素在Safari上不稳定吗?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18364405/