1

Code for Chrome, Opera, Safari for scrollbar as below:

.scroll_bar::-webkit-scrollbar {
  width: 20px;
}
.scroll_bar::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0px 0px 6px #0067ab;
  border-radius: 5px;
}
.scroll_bar::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0px 0px 6px #0067ab;
  border-radius: 5px;
}

And what I should do for Firefox?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
  • 2
    Possible duplicate of [Custom CSS Scrollbar for Firefox](https://stackoverflow.com/questions/6165472/custom-css-scrollbar-for-firefox) – Timo Dec 28 '17 at 13:11
  • It seems that Firefox doesn't support CSS custom scrollbars, you can make use of javascript though. –  Dec 28 '17 at 13:16
  • @Highdef I search also for that. But don't need any library for that. – Aryan Infotech Dec 28 '17 at 13:40

3 Answers3

0

would you like to use this.

custom scroll bar using js

Shiva
  • 192
  • 1
  • 1
  • 12
0

There is a solution to your problem on Mozilla Searchfox.

scrollbar[orient='vertical'] {
  margin-left: -4px;
  margin-top: 1px;
  min-width: 3px;
  max-width: 3px;
}

scrollbar[orient='vertical'] thumb {
  max-width: 3px !important;
  min-width: 3px !important;
}
Penny Liu
  • 15,447
  • 5
  • 79
  • 98
-1

Here you can see it on css tricks Just change use -moz instead of -webkit

Shiva
  • 192
  • 1
  • 1
  • 12
  • It's not supported by Firefox. –  Dec 28 '17 at 13:16
  • **It's not supported in FireFox at the moment**. I wish you have read the contemplate conversation in the link you offered, at the end of that it has been stated that there is no CSS solution to make FireFox to support it at the moment, maybe in near future there will be. – Muhammad Musavi Jun 19 '18 at 12:02