【发布时间】:2021-01-01 21:04:00
【问题描述】:
当我快速将鼠标悬停/鼠标移出元素时,有什么方法可以修复动画错误?
这是网站的实时版本 - https://daphne-rebuild.netlify.app/
当我快速在圆圈上悬停时,它会变得有问题。一直在发生,所以我真的希望有某种解决方法。
<div class="hover-circle" @mouseover="hoverCircle" @mouseout="leaveCircle">
<div class="circle"></div>
<span>Enter</span>
</div>
hoverCircle(e) {
gsap.to(".hover-circle .circle", {
duration: 1,
scale: 1.3,
ease: "power4.out"
});
gsap.to(`.home-${this.currentComponent}`, {
delay: 0.1,
duration: 1,
scale: 1.05,
ease: "power4.out"
});
},
leaveCircle() {
gsap.to(".hover-circle .circle", {
duration: 0.5,
scale: 1,
ease: "power4.inOut"
});
gsap.to(`.home-${this.currentComponent}`, {
duration: 0.5,
scale: 1,
ease: "power4.inOut"
});
},
【问题讨论】:
标签: javascript vue.js