admin管理员组文章数量:1401134
I have a path I wish to animate:
<motion.path
initial={{ pathLength: 0 }}
transition={{ duration: 5, ease: 'easeInOut' }}
whileInView={{ pathLength: 1 }}
viewport={{ once: true, amount: 0.5 }}
/>
I want to start the animation when it comes in to view, and even if the user scrolls away, I want the animation to have continued regardless.
What I am getting now is the animation starts when in view, but if you scroll away, it stops, when you come back, what is left to animate is subject again to a full 5 seconds of animation, making it animate very slowly if upon first view, the line was almost animated completly.
本文标签: framer motionAnimate When In ViewOnceStack Overflow
版权声明:本文标题:framer motion - Animate When In View, Once - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744289264a2599035.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论