Shows how to use the Intersection Observer API with JavaScript and CSS to detect when elements enter the viewport and animate them into view with a fade and slide as the reader scrolls. It suits people who already write some HTML and CSS.
What you’ll learn
✓Detect when page elements enter the viewport with Intersection Observer
✓Animate elements to fade and slide into view on scroll
✓Toggle CSS classes from a JavaScript callback to trigger transitions