【发布时间】:2015-07-07 14:11:24
【问题描述】:
我在https://github.com/danro/jquery-easing/blob/master/jquery.easing.js 看到了 jQuery 的缓动函数。
我看到每个函数需要 5 个参数,但我无法弄清楚它们是什么以及它们如何与对 animate 的调用联系起来。
-
x- ???? -
t- 当前时间 -new Date()??? -
b- 起始值 -
c- 价值变化??? -
d- 持续时间
例如,我会调用如下函数:
$("div").width(50).animate({
width: 150px
}, 2000);
这个调用会像这样匹配吗:
-
x- ???? -
t- 每次调用更新的当前时间 -
b- 50px -
c- 100px -
d- 2000
【问题讨论】:
-
你为什么不阅读documentation而不是源代码?
-
@Andreas:我做了,但它没有回答我关于每个参数是什么的问题。
标签: javascript jquery animation