【发布时间】:2019-02-25 09:44:30
【问题描述】:
我希望 .title 出现,然后 .element 出现,然后是 .list。但是,我似乎无法弄清楚该怎么做。它们总是同时出现。
setTimeout(function() {
$("#screen" + screenNum).show();
$("#screen" + screenNum + " .title").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
x: -1000,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
$("#screen" + screenNum + " .element").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
y: 1080,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
$("#screen" + screenNum + " .list").each(function(index) {
$(this).css("display", "block");
TweenLite.from($(this), animationSpeed, {
y: -500,
ease: Cubic.easeOut,
delay: index * 0.1
});
});
}, numEle * 100);
【问题讨论】:
-
我认为这是因为您的超时包括所有内容。如果你分开做,它会起作用。或者你 tweek 延迟,因为我认为每个动作的延迟都是相等的
标签: javascript jquery function settimeout delay