前置:安卓端的h5页面长列表滚动两个问题:1.移动端的长列表滚动直接像浏览器一样用原生/默认的滚动不行么?2.为什么有的h5页面非要用iscroll这样的js插件来实现呢?这里只限定滚动(不考虑滚动加载之类的效果)
2 回答
蝴蝶不菲
TA贡献1810条经验 获得超4个赞
Even on platforms where native scrolling is good enough, iScroll adds
features that wouldn't be possible otherwise. Specifically:Granular control over the scroll position, even during momentum. You
can always get and set the x,y coordinates of the scroller. Animation
can be customized with user defined easing functions (bounce, elastic,
back, ...). You can easily hook to a plethora of custom events
(onBeforeScrollStart, onScrollStart, onScroll, onScrollEnd, flick,
...). Out of the box multi-platform support. From older Android
devices to the latest iPhone, from Chrome to Internet Explorer.
简单说就是,iscroll具有:
细粒度控制,可以实时获取x,y坐标。
可以定制多种动画模型
有许多好用的钩子,例如onScrollStart...
跨平台性。
此外,iscroll会根据设备和浏览器的不同,选择性能最佳的方式进行模拟滚动。
添加回答
举报
0/150
提交
取消