anime.js - How do I use animejs to create an animation of circles rotating around the center of another circle? - Stack Overflow

admin2025-04-17  3

I want to create an animation of circles spread evenly on another circle and then rotate them about the center of this outer circle on loop. I have tried to do this by first placing them with transform-origin and rotate. This places them as I intended here

Then I tried to use anime js to animate them using a rotate transform, but adding this seems to override the previous rotate transforms and all circles start at the default position.

anime({
  targets: '.circle',
  rotate: '1turn',
  easing: 'linear',
  duration: 24000,
  loop: true,
})
转载请注明原文地址:http://anycun.com/QandA/1744848852a88472.html