DEV Community

Jackie Yio Hex 🍥
Jackie Yio Hex 🍥

Posted on

✨ CSS bits: Smooth Scroll Animations with scroll-behavior

html {
  scroll-behavior: smooth;
}
Enter fullscreen mode Exit fullscreen mode

Explanation: This single line of CSS makes all anchor links and programmatic scrolls smooth and animated. It's a subtle but impactful improvement to user navigation.

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay