我正在尝试使用Velocity UI库循环一系列动画,但序列成功运行一次然后停止。
我尝试在animationSequence之后添加{loop:" true"},但它没有工作。请帮忙。
以下是剧本:
var animationSequence = [
{
e: $(".custom-set-1"),
p: { opacity: 1 },
o: { duration: 1000 }
}, {
e: $(".custom-set-1"),
p: { opacity: 0 },
o: { duration: 1000, delay: 3500 }
}, {
e: $(".custom-set-2 .text-1"),
p: { opacity: 1 },
o: { duration: 1000 }
}, {
e: $(".custom-set-2 .text-2"),
p: { opacity: 1 },
o: { duration: 1000, delay: 1000 }
}, {
e: $(".custom-set-2 .text-1"),
p: { opacity: 0 },
o: { duration: 1000, delay: 3500 }
}, {
e: $(".custom-set-2 .text-2"),
p: { opacity: 0 },
o: { duration: 1000 }
}, {
e: $(".custom-set-3 .text-1"),
p: { opacity: 1 },
o: { duration: 1000 }
}, {
e: $(".custom-set-3 .text-2"),
p: { opacity: 1 },
o: { duration: 1000, delay: 1000 }
}, {
e: $(".custom-set-3 .text-1"),
p: { opacity: 0 },
o: { duration: 1000, delay: 3500 }
}, {
e: $(".custom-set-3 .text-2"),
p: { opacity: 0 },
o: { duration: 1000 }
}, {
e: $(".custom-set-4"),
p: { opacity: 1 },
o: { duration: 1000 }
}, {
e: $(".custom-set-4"),
p: { opacity: 0 },
o: { duration: 1000, delay: 3500 }
}, {
e: $(".custom-set-5"),
p: { opacity: 1 },
o: { duration: 1000 }
}, {
e: $(".custom-set-5"),
p: { opacity: 0 },
o: { duration: 1000, delay: 3500 }
}];
$.Velocity.RunSequence(animationSequence, {loop: "true"});