You can achieve that effect using the Intersection Observer API — it lets your animation trigger only when the element becomes visible on the screen. That way, your div won’t start animating while it’s still offscreen.
If you need more instruction, contact me!
New! Stand out from the crowd by taking our gamified personality tests. Get started now by discovering the three tests available free of charge!