Javascript 为什么GSAP在连续快速单击时冻结动画?
例如,我在单击时运行动画,但如果我在按钮上多次单击谁运行动画,但速度非常快,动画处于冻结状态。为什么可能呢 我的JS:Javascript 为什么GSAP在连续快速单击时冻结动画?,javascript,animation,gsap,Javascript,Animation,Gsap,例如,我在单击时运行动画,但如果我在按钮上多次单击谁运行动画,但速度非常快,动画处于冻结状态。为什么可能呢 我的JS: gsap.from(".tab-wrapper-item__box h3", { duration: 0.3, x: "-100%", opacity: 0, scale: 0, ease: "circ.out", });
gsap.from(".tab-wrapper-item__box h3", {
duration: 0.3,
x: "-100%",
opacity: 0,
scale: 0,
ease: "circ.out",
});
gsap.from(".tab-wrapper-item__box p", {
duration: 0.5,
x: "100%",
opacity: 0,
scale: 0,
ease: "circ.out",
delay: 0.5,
});
gsap.from(".tab-wrapper-item img", {
duration: 0.3,
y: "-100%",
opacity: 0,
scale: 0,
delay: 0.3,
});
gsap.from(".tab-wrapper-item__box .btn", {
duration: 0.5,
y: "100%",
opacity: 0,
scale: 0,
ease: "circ.out",
delay: 0.9,
});
你在做一件最棒的事。引述文章,
解决方法很简单:使用.fromTo()。或者,可以事先创建动画并使用控制方法
我建议你通读整件事
仅供参考,你更有可能更快地回答这些问题