先来说一下官网例子吧 API 自己看咯
https://mp.weixin.qq.com/debug/wxadoc/dev/component/scroll-view.html?t=20161122
有很多的注意事项,如果你不注意,滚动效果真的真的粗不来~~
- html中
- scroll-view竖向滚动必须设置scroll-y="true" style="height: 200rpx;" 必须..
- style="height: 200rpx;" 必须为200rpx/200px 不能用百分号
- js中
- "toView","scrollTop"必须设置值
- "scrollTop": 0,必须为数值