DEV Community

Cover image for Create Custom Scrollbar
 My Code Magic
My Code Magic

Posted on

10 3

Create Custom Scrollbar

Set the SCROLLBAR width
Here is Code

::-webkit-scrollbar {
  width: 20px;
  -webkit-transition: all 300ms;
  transition: all 300ms;
}
Enter fullscreen mode Exit fullscreen mode



Set the SCROLLBAR track
Here is Code

::-webkit-scrollbar-track {
  background-color: #EDF2F4;
}
Enter fullscreen mode Exit fullscreen mode



Set the SCROLLBAR thumb
Here is Code

::-webkit-scrollbar-thumb {
  border-radius: 7px;
  background: #2B2D42;
  border-left: 3px solid #EDF2F4;
  border-right: 3px solid #EDF2F4;
}
Enter fullscreen mode Exit fullscreen mode

Now i am sure you can Create Successfully Am I Right ?



Thanks for watching guys also apply a custom scrollbar to your Website I hope you understand everything steps.
Also visit our website mycodemagic

Top comments (2)

Collapse
 
matiasgdev profile image
Matias Gabriel • Edited

Pretty cool. This works on Google Chrome but in Firefox use the scrollbar-width & scrollbar-color properties :)

Collapse
 
mycodemagic profile image
My Code Magic

Sure 🙂

Neon image

Next.js applications: Set up a Neon project in seconds

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Get started →

👋 Kindness is contagious

Dive into this thoughtful article, cherished within the supportive DEV Community. Coders of every background are encouraged to share and grow our collective expertise.

A genuine "thank you" can brighten someone’s day—drop your appreciation in the comments below!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found value here? A quick thank you to the author makes a big difference.

Okay