animate js on scroll code example

Example 1: aos js

CSS
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">

JS
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>

INITIALIZE AOS:
<script>
  AOS.init();
</script>

Example 2: animate on scroll

<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">

Example 3: aos animate install

//install
npm install aos --save


//initialize in react

import AOS from 'aos'
import 'aos/dist/aos.css';
AOS.init();

Example 4: animate on scroll

<!---Add script right before closing </body> tag, and initialize AOS:--->

  <script src="https://unpkg.com/aos@next/dist/aos.js"></script>
  <script>
    AOS.init();
  </script>