前置:
- 安卓端的h5页面
- 长列表滚动
两个问题:
1.移动端的长列表滚动直接像浏览器一样用原生/默认的滚动不行么?
2.为什么有的h5页面非要用iscroll
这样的js插件来实现呢?
这里只限定滚动(不考虑滚动加载之类的效果)
前置:
两个问题:
1.移动端的长列表滚动直接像浏览器一样用原生/默认的滚动不行么?
2.为什么有的h5页面非要用iscroll
这样的js插件来实现呢?
这里只限定滚动(不考虑滚动加载之类的效果)
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具有:
此外,iscroll会根据设备和浏览器的不同,选择性能最佳的方式进行模拟滚动。
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
3 回答2.3k 阅读✓ 已解决
3 回答2.1k 阅读✓ 已解决
安卓的原生滚动没有运动曲线,非常生硬.
滚动插件提供了一些边界回弹之类的原生没有的效果
最主要的是在几年之前,原生不支持在固定区域内滚动...