Last active
September 20, 2024 15:47
-
-
Save kyrylo/3fb31d97b9a8e12aa1593b4152a5859e to your computer and use it in GitHub Desktop.
How to hide scrollbars in 2024
This file contains 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
/* Plain CSS */ | |
/* Hide scrollbar for Chrome, Safari and Opera */ | |
.no-scrollbar::-webkit-scrollbar { | |
display: none; | |
} | |
/* Hide scrollbar for IE, Edge and Firefox */ | |
.no-scrollbar { | |
-ms-overflow-style: none; /* IE and Edge */ | |
scrollbar-width: none; /* Firefox */ | |
} |
This file contains 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
/* For TailwindCSS, just wrap it in @layer utilities { ... } */ | |
@layer utilities { | |
/* Hide scrollbar for Chrome, Safari and Opera */ | |
.no-scrollbar::-webkit-scrollbar { | |
display: none; | |
} | |
/* Hide scrollbar for IE, Edge and Firefox */ | |
.no-scrollbar { | |
-ms-overflow-style: none; /* IE and Edge */ | |
scrollbar-width: none; /* Firefox */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment