![]() |
VOOZH | about |
Anime.js is a lightweight JavaScript library with a simple and small powerful API. It works with the DOM element, CSS, and JavaScript object.
Installation of anime.js: There are two ways to use anime.js in your project:
<script src=”https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.0/anime.min.js%E2%80%9D></script>
Creating an application and Project structure: This is a simple web page. All we need to do is create a project and inside it create an HTML File named index.html.
mkdir animation && cd animation
touch index.html
Example 1:
Output:
Example 2: In this example, the translateX property becomes more clear. It first translates into -ve x axis and then +ve x axis.
index.html
Output: