Created
June 4, 2023 08:55
-
-
Save Anmol-Baranwal/3b3644e5bf5e8893f18637b2e05a37e7 to your computer and use it in GitHub Desktop.
CSS Code for custom scrollbar ensuring browser cross-compatibility issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Scrollbar / | |
/ Webkit-based browsers */ | |
::-webkit-scrollbar { | |
width: 16px; | |
} | |
::-webkit-scrollbar-track { | |
background: transparent; | |
} | |
::-webkit-scrollbar-thumb { | |
background: linear-gradient(#8034e4,#E638EAFF); | |
} | |
/* Firefox 64+ */ | |
*{ | |
scrollbar-width: thin; | |
scrollbar-color: #8034e4 #E638EAFF; | |
} | |
/* Firefox 63 and below */ | |
*{ | |
scrollbar-width: thin; | |
scrollbar-color: #8034e4 #E638EAFF; | |
} | |
/* Internet Explorer and Microsoft Edge */ | |
*::-ms-scrollbar { | |
width: 16px; | |
} | |
*::-ms-scrollbar-track { | |
background: transparent; | |
} | |
*::-ms-scrollbar-thumb { | |
background: linear-gradient(#8034e4,#E638EAFF); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment