I am trying to disable the elastic scrolling/bounce that is caused when pulling down from the top of an iOS Safari Page or vice versa at the bottom.
我正在尝试禁用从iOS Safari页面顶部向下拉时引起的弹性滚动/反弹,反之亦然。
I have tried a technique below which I have seen people have said works but hasn't worked so far for me:
我已经尝试了一种技术,我已经看到人们已经说过工作,但到目前为止还没有为我工作:
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
#ios-scroll-wrapper {
overflow: auto OR scroll;
}
}
Is this something that is not able to be disabled now on iOS Safari? It's quite annoying to have as I have a fixed header/navigation at the top of the screen and pulling the page down causing the elastic scroll to either pull all content down apart from the header or with the above fix it will pull the content down and the header will disappear.
这是iOS Safari上现在无法禁用的内容吗?因为我在屏幕顶部有一个固定的标题/导航并且向下拉页面导致弹性滚动将所有内容从标题中拉下来或者通过上面的修复它会将内容拉下来并且非常烦人。标题将消失。
EDIT: Just as an FYI, this page/site is not using PhoneGap and a lot of solutions I have looked at so far use PhoneGap.
编辑:就像一个FYI,这个页面/网站没有使用PhoneGap,我到目前为止看到的很多解决方案都使用PhoneGap。
1 个解决方案
#1
-1
Try this:
尝试这个:
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
As stated at Css-tricks
正如Css-tricks所述
#1
-1
Try this:
尝试这个:
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
As stated at Css-tricks
正如Css-tricks所述