slw*_*lwd 5 scrollbar mobile-safari hide ipad
我正在使用iPad(移动游猎):
问:有谁知道如何在iPad上隐藏滚动条?
我已经看过使用:: - webkit-scrollbar看了webkit滚动条样式...这对主窗口滚动条不起作用.
场景:我在div中的重复图像超过10,000px到10,000px.我希望用户能够滑动屏幕在这个巨大的div上移动,这实际上是一个大图像,没有滚动条显示.
所以我需要滚动条的功能,我只需要隐藏它们.
建议?
谢谢你的帮助!-slwd
您也许可以使用 TouchScroll 库:http://uxebu.com/blog/2010/04/27/touchscroll-a-scrolling-layer-for-webkit-mobile/
否则,我会做的是overflow: hidden
在你的 div 上设置,然后使用 JavaScript 来实现滚动。这将需要侦听 touchstart、touchmove 和 touchend 事件,并相应地移动图像的 x/y 位置。如果您需要摩擦减慢(类似于移动 Safari 上滚动视图中内置的内容),您也可以实现它。跟踪 touchmove 事件之间的 dx/dy,将其用作接收 touchend 时的起始速度,然后使用 setInterval 作为计时器来应用摩擦力,直到达到停止动画的最小阈值。