Use CSS Scroll Behavior for Animated Anchor Scrolls

InstructorJhey Tompkins

Share this video with your friends

Send Tweet

In this lesson, we take a look at how to implement animated anchor scrolling using CSS scroll-behavior. We can do this whilst respecting our users' preference for motion and in a way that shouldn't annoy them when searching the page.

Mirha Masala
~ 3 years ago

I don't believe focus-within solves much for the inline links. Here's a fork of your Codepen: https://codepen.io/mirhamasala/pen/BadyyZV (The Codepen provided doesn't use inline links, unfortunately). Am I missing something?