gpt4 book ai didi

javascript - 如何在jquery动画中定义缓动选项?

转载 作者:行者123 更新时间:2023-11-28 19:40:28 24 4
gpt4 key购买 nike

我需要在使用 jQuery 完成的动画上设置缓动“easeInCubic”。

这是我的代码:

$('#content-scroll-inner:not(:animated)').animate({ 'top': moveOf}, this.animationSpeed, this.cbEndAnimation.bind(this));

尝试类似的事情

$('#content-scroll-inner:not(:animated)').animate({ 'top': moveOf},'easeInCubic', this.animationSpeed, this.cbEndAnimation.bind(this));

我做错了什么以及如何解决它?

最佳答案

使用easing选项设置缓动效果:

 easing: 'easeInCubic'

这样:

 $('#content-scroll-inner:not(:animated)').animate({ 'top': moveOf},easing:'easeInCubic', this.animationSpeed, this.cbEndAnimation.bind(this));

关于javascript - 如何在jquery动画中定义缓动选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25178487/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com