2

I want to try to emulate the touch scroll gestures found on touchscreen devices for PC/Mac. However, I don't want to disable the scrollwheel. I would like to hide the scrollbar though.

Does anyone know any demos/code out there that attempts to do this?

vcsjones
  • 138,677
  • 31
  • 291
  • 286
David
  • 4,717
  • 8
  • 35
  • 46

2 Answers2

0

In Webkit-based browsers (e.g., Chrome), you can use ::-webkit-scrollbar:

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

In Firefox, you can use scrollbar-width:

* {
  scrollbar-width: none;
}
Abdull
  • 26,371
  • 26
  • 130
  • 172
0

On certain browsers1, hiding the main scrollbar is impossible. However, the general method is this:

html {
    overflow: hidden;
}

Demo, and here's a demo with the scrollwheel handled.


1 i.e. IE8 and lower.

http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel

Ry-
  • 218,210
  • 55
  • 464
  • 476