gpt4 book ai didi

jquery-animate - jQuery animate() 显示动画进度的百分比

转载 作者:行者123 更新时间:2023-12-02 00:25:47 27 4
gpt4 key购买 nike

使用以下代码段:http://jsfiddle.net/sylouuu/V7a3Y/2/
我想在动画的#log 中显示从 0% 到 100% 的进度百分比,100% 很容易通过回调...

有可能这样做吗?

问候

最佳答案

jQuery 动画进度回调是在 1.8 中引入的:

$('#a').animate({
opacity: 1,
width: 400,
percent: 100
}, {
progress: function(animation, progress, msRemaining) {
$('#log').html(100 * progress + "%");
}
});

关于jquery-animate - jQuery animate() 显示动画进度的百分比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8970887/

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