Google News
logo
Anime.js - Interview Questions
How to Installation of anime.js?
There are two ways to use anime.js in your project:
 
Step 1 : You can download the anime.min.js file and directly use it.

Download
* Via npm
$ npm install animejs --save
or manual download.
 
Usage

* ES6 modules
import anime from 'animejs/lib/anime.es.js';
* CommonJS
const anime = require('animejs');
* File include
 
Link anime.min.js in your HTML :
<script src="anime.min.js"></script>
 


Step 2 : Just google anime.js CDN and you will get the link and just put it in your script tag as shown below.
<script src=”https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js”></script>​

Example :

Hello world
anime({
  targets: 'div',
  translateX: 250,
  rotate: '1turn',
  backgroundColor: '#FFF',
  duration: 800
});​
 
Advertisement