Rocky Barua
Rocky Barua

Reputation: 660

Best way to use animation on scroll?

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?

Upvotes: 0

Views: 679

Answers (2)

Mad7Dragon
Mad7Dragon

Reputation: 1313

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.

Upvotes: 1

Muhammad Nurfarhan
Muhammad Nurfarhan

Reputation: 23

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/

Upvotes: 1

Related Questions