Questions tagged «easing-functions»

4
jQuery轻松功能,无需使用插件
我正在寻找可以与jQuery一起使用的自定义缓动函数的在线列表。 我对为此使用插件不感兴趣,也对jQuery UI不感兴趣。 我发现下面的一个弹跳不错,但我正在寻找其他几个弹跳,以便可以选择。 代替其他功能,对此功能的简要说明将是很棒的。谢谢! 例: $.easing.custom = function (x, t, b, c, d) { var s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; } 编辑#1: 这是所有jQuery UI缓动功能的在线演示。杰克(Jake)在下面以正确答案发布了来自UI的源函数。 http://api.jqueryui.com/easings/ 编辑2: 事实证明,我上面发布的示例缓动功能与jQuery UI中的“ easeInOutBack”完全相同。 编辑#3: 这里有一些可供下载的其他独立宽松方程式... http://www.robertpenner.com/easing/
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.