Framer Motion while Hover 不会重复

问题描述 投票:0回答:0

我无法按照此处的 Framer Motion 文档重复我的悬停动画https://www.framer.com/motion/transition/###repeat

动画在悬停时正确播放,它只播放一次。 这是相关代码:

<motion.div
   whileHover={{
     y: [0, -4, 0],
     transition: {
       duration: 0.3,
       repeat: Infinity,
    },
  }}
>...</motion.div>
animation hover repeat framer-motion
© www.soinside.com 2019 - 2024. All rights reserved.