0

I want to give a scrollbar style to a div but only on windows systems.

Most mobile devices have invisible scrollbars and I don't want to make them visible. Mac OS scrollbars are ahestetically ok to me, I just need to make the big gray scrollbars on windows more similar to those of Mac OS.

Is there a media query or other similar method to target only windows scrollbars for styling?

1 Answers1

0

You Can Create a custom scroll bar using this css

<style>
/* width */
::-webkit-scrollbar {
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1; 
}
 
/* Handle */
::-webkit-scrollbar-thumb {
  background: #888; 
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555; 
}
</style>

I Hope it's Help you

Thanks

  • Thank you but I already know how to do this, what I need is for this to make effect only if I'm in Windows, not for Mac OS or mobile – Claudio Bonifazi Feb 25 '21 at 11:20