javascript - 淡出后的进度

标签 javascript jquery

我不想在淡出完成时调用动画函数。不是在它淡出的时候。我认为fadeOut中的“进度”功能是正确的。有人可以帮助我,我不知道如何在我的代码上应用“进度”功能。

$(".intro").animate({height:'100%', width:'100%'}, 2000, function(){
            $(this).append("<div class='text'>Welcome to Progressbar_v1</div>"); $(".text").css({"height":"23px","width":"auto","position":"absolute","top":"0","left":"0","bottom":"0","right":"0","margin":"auto"}).animate({fontSize:'3em'},"slow");
            $(".text").fadeOut(4000);
});
$(".intro").animate({height:'30px', width:'500px'}, 2000);

最佳答案

使用.fadeOut()回调

$(".intro").animate({height:'100%', width:'100%'}, 2000, function(){
            $(this).append("<div class='text'>Welcome to Progressbar_v1</div>"); $(".text").css({"height":"23px","width":"auto","position":"absolute","top":"0","left":"0","bottom":"0","right":"0","margin":"auto"}).animate({fontSize:'3em'},"slow");
            $(".text").fadeOut(4000, function() {
                 $(".intro").animate({height:'30px', width:'500px'}, 2000);
            });
});

关于javascript - 淡出后的进度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24163586/

相关文章:

javascript - 无法使用 .replaceWith() 函数删除标记之间的所有 html 代码

javascript - 如何使用 JavaScript 测试字符串中的字母是大写还是小写?

javascript - 如何使用 jQuery 仅验证一个 HTML 控件

javascript - 如何通过表单提交插入后显示成功消息

javascript - Asp mvc 和 Ajax 中的自动完成

javascript - (HTML + Javascript)获取文本输入以显示在 Canvas 上,并获取单选按钮输入以填充背景

javascript - 如何让 Javascript Word Counter 在 IE 中工作

javascript - 有没有 jsPlumb 的替代品? (为了连接 DOM 元素)

javascript - 显示/隐藏谷歌地图

javascript - 如何选择文字?