为了账号安全,请及时绑定邮箱和手机立即绑定

大家一起看看这段js代码,有引用skrollr.js,到底做了哪些事情?

大家一起看看这段js代码,有引用skrollr.js,到底做了哪些事情?

翻过高山走不出你 2018-10-20 08:10:09
一段代码jsskrollr.js
查看完整描述

1 回答

?
吃鸡游戏

TA贡献1829条经验 获得超7个赞

你去查上下文 data.curTop 和 data.lastTop 的取值

然后官方文档里有描述

A listener function that gets called each time right before we render everything. The function will be passed an object with the following properties:

{    curTop: 10, //the current scroll top offset
    lastTop: 0, //the top value of last time
    maxTop: 100, //the max value you can scroll to. curTop/maxTop will give you the current progress.
    direction: 'down' //either up or down}

Returning false will prevent rendering.

当返回 false 停止渲染


查看完整回答
反对 回复 2018-11-07
  • 1 回答
  • 0 关注
  • 437 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号