How to hide scrollbars on mobile devices or emulators without affecting scrolling behavior in React app?
P粉208286791
P粉208286791 2023-08-17 15:35:56
0
1
621
<p>On mobile devices, I would like to completely hide the scrollbars throughout the application, but I need the user to be able to scroll. </p> <p>I tried using CSS scrollbar, scrollbar-thumb, scrollbar-thumb:hover and scrollbar-track to hide the scrollbar, it works on the browser but not on mobile devices. </p>
P粉208286791
P粉208286791

reply all(1)
P粉896751037

You need to use two CSS properties, one for webkit and another for Mozilla, as shown below -

.invisible-scrollbar::-webkit-scrollbar {
  display: none;
}

.invisible-scrollbar {
  scrollbar-width: none;
}

Where .invisible-scrollbar is the class added to the related element.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template