Show DN: I made a CSS3 scroll position based animation library
7 years ago from Erik Terwan, Full stack developer.
Hi!
I was looking for a small library to trigger animations based on the users scroll position, e.g. for animating in blocks when they are in the viewport. But every library out there was either to big or complex, or 'jacked' the users scroll, so i wrote one.
It's based on requestAnimationFrame so the animations get triggered when the browser is ready for it, and not when the user scrolls. That way the user/browser keeps their original scroll behaviour.
It triggers CSS classes so the animation possibilities are (almost) endless. And you can write animations in the language that you are used to.
Demo: https://terwanerik.github.io/ScrollTrigger
Source: https://github.com/terwanerik/ScrollTrigger
Let me know what you think!
Cheers,
Erik
Login to Comment
You'll need to log in before you can leave a comment.
LoginRegister Today
New accounts can leave comments immediately, and gain full permissions after one week.
Register now