A tutorial on the IntersectionObserver browser API, showing how to detect when HTML elements enter the viewport and use that to trigger CSS scroll-activated animations and lazy loading of images without third-party scripts. It is aimed at people who already build web interfaces.
What you’ll learn
✓Detect when an element enters the viewport with IntersectionObserver
✓Trigger CSS classes for scroll-activated animations