Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make thin scrollbar in chrome?

Tags:

html

css

sass

I have make thin scrollbar in Firefox for this css:

  scrollbar-width: thin;
  scrollbar-color: rgba(155, 155, 155, 0.5) transparent; 

it's worked for firefox.

Now i need to make thin scrollbar in chrome. I have tried this css

*-webkit-scrollbar {
  width: 9px;
}
*-webkit-scrollbar-track {
  background: transparent;
}
*-webkit-scrollbar-thumb {
  background-color: rgba(155, 155, 155, 0.5);
  border-radius: 20px;
  border: transparent;
}

But this code does not work in chrome.

Any suggestion please.

like image 772
Alamin Avatar asked Dec 02 '25 12:12

Alamin


1 Answers

Try this:-

::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(155, 155, 155, 0.5);
  border-radius: 20px;
  border: transparent;
}
like image 182
Vibhaas Srivastava Avatar answered Dec 04 '25 02:12

Vibhaas Srivastava



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!