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

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay