gpt4 book ai didi

jquery - 如何使用 jQuery 的 animate() 函数完全重复动画?

转载 作者:行者123 更新时间:2023-12-01 03:52:20 25 4
gpt4 key购买 nike

这是我的代码。如何让动画在每次完成时重复播放?

$('img.balloon').animate({
bottom : '100%'
}, 4000, 'linear', function() {
// on complete repeat but how?
});

最佳答案

(function doAnim(){
$('img.balloon').css('bottom', '-20px').animate({
bottom : '100%'
}, 4000, 'linear',
doAnim);
})();

关于jquery - 如何使用 jQuery 的 animate() 函数完全重复动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7154843/

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