禁用 Safari 5 的“过度滚动”功能;使用 CSS 或 JavaScript 的行为
OS X Lion 上的 Safari 5 允许您滚动越过页面的可见边界,显示其下方的亚麻纹理。这是一个很好的效果,但对于某些网络应用程序 - 特别是那些具有固定位置元素(如侧边栏)的应用程序 - 它可能会分散注意力。有谁知道如何使用 CSS 或 JavaScript 禁用该效果?这一定是可能的,因为苹果自己的 iCloud 等网站已经这样做了。
Safari 5 on OS X Lion allows you to scroll past the visible bounds of the page, revealing a linen texture beneath it. It's a nice effect, but for some web apps – particularly those with fixed-position elements like a sidebar – it can be distracting. Does anyone know how to disable the effect using CSS or JavaScript? It must be possible, because some sites like Apple's own iCloud have done so.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有一篇 博客文章 讨论了如何在 Mac OS X 和 iOS 上禁用弹性滚动设备。根据该网站的说法,它似乎与桌面浏览器的以下 CSS 规则一样简单:
There is a blog post that talks about what you need to do to disable elastic scrolling on both Mac OS X and iOS devices. According to the site it appears to be as simple as the following CSS rule for desktop browsers:
这可以解决问题:
使用 iOS8 和 iOS9 进行测试和验证。
This does the trick:
Tested and verified with iOS8, and iOS9.