使用 Framer Motion,我想要在鼠标悬停在父元素(一个按钮)上时,将我的 Icon 组件旋转 90 度。
<motion.button type="button" whileHover={{scale: 1.1}}>
Visit our Industry
{/*Animate this Icon to rotate 90 degrees*/}
<Icon type="arrow-up" />
</motion.button>
我看到使用了变体但不确定如何在像whileHover
这样的 props 中真正使用它们。
由于这是一个新的东西,任何帮助都将不胜感激。