Are scrollbars necessary?
A scrollbar is needed in instances where there are a lot of items in a dropdown menu. The general rule is that only 6 to 10 items should be visible in the dropdown.
Can you hide scrollbar?
To hide the scrollbar in WebKit-based browsers, you have to use the ::-webkit-scrollbar pseudo selector. ::-webkit-scrollbar is a pseudo-element in CSS used by developers to modify the look of a browser's scrollbar. With the ::-webkit-scrollbar pseudo selector, there's a wide range of things you can do to a scrollbar.
How do I hide the scroll bar for inactivity?
Approach: The onscroll event is used to disable the scroll bar. The onscroll event acts as soon as the page is scrolled. So, setTimeout() method is used to provide a delay to hide the scroll bar, so that we are able to scroll down first.