When I wanted to use animation on a scroll, I saw there are a few ways to do it. Such as using a library, only CSS and JS, etc.
If we keep things in mind such as browser compatibility, lightweight, ease to use, etc. what do you think is the best way to add animation on scroll?
CodePudding user response:
I think you can use a library like AOS. Library AOS, also called Animate on Scroll, is one such library and it does exactly what its name suggests: it lets you apply different kinds of animations to elements as they scroll into view.
https://michalsnik.github.io/aos/
CodePudding user response:
It depends on the complexity of the animation. As you mentioned, If you can make sure that the library is supported in all browsers and you don't want to write code, then it's the best option. On the other hand, If you use CSS and js, you can check the browsers compatibility before using the feature on this website and ensure it's supported.