css animate on scroll code example
Example 1: animate on scroll
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet">
Example 2: animate on scroll
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script>
Example 3: animation on scroll css
svg {
position: fixed; /* make sure it stays put so we can see it! */
animation: rotate 1s linear infinite;
/*animation-play-state: paused;*/
animation-delay: calc(var(--scroll) * -1s);
}
Example 4: aos animate install
//install
npm install aos --save
//initialize in react
import AOS from 'aos'
import 'aos/dist/aos.css';
AOS.init();
Example 5: aos animate
<script>
AOS.init();
</script>
Example 6: animate on scroll
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
AOS.init();
</script>