Is there a way to keep the scrollbars always visible in mobile browser. By default a scrollable page get its scroll visible only when a touch/swipe is happening. How can I make the scrollbars always visible ?
Asked
Active
Viewed 2.7k times
12
-
Many mobile browsers don't show scrollbars at all, while some show them only while scrolling. So no matter what you put in your CSS,thing you want to achieve might be impossible. – Richa Sep 05 '14 at 11:16
-
@Richa are you sure. Is there any documentation for that. I can simply show that to client and stop trying the impossible – Jagadeesh J Sep 05 '14 at 11:19
-
Do you want it for all mobile browser only in mobile devices?? For PC browser you can do `html {overflow-y:scroll;}` – Richa Sep 05 '14 at 11:22
-
@Richa, I need it for mobile.. There is a table and it will not show scrollbar for Large screen. The same will be scrollable in medium/small screens. Everything is perfect but I want to show the scroller always – Jagadeesh J Sep 05 '14 at 11:24
-
Check this http://stackoverflow.com/questions/22907777/make-scrollbar-visible-in-mobile-browsers – Richa Sep 05 '14 at 11:26
1 Answers
22
Try this one on your css styles
::-webkit-scrollbar {
-webkit-appearance: none;
}
::-webkit-scrollbar:vertical {
width: 12px;
}
::-webkit-scrollbar:horizontal {
height: 12px;
}
::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, .5);
border-radius: 10px;
border: 2px solid #ffffff;
}
::-webkit-scrollbar-track {
border-radius: 10px;
background-color: #ffffff;
}

user2169710
- 399
- 1
- 3
- 8
-
Or with this code html { overflow: -moz-scrollbars-vertical; overflow-y: scroll; } Should be works – user2169710 Sep 05 '14 at 11:20
-
1This works in Android devices browsers, not in iPhone safari or iPhone chrome. – Amit Shah Feb 17 '17 at 09:19
-
1setting -webkit-overflow-scrolling: auto along with other styles above, works in safari, iphone browsers – Sasi Kumar M Oct 16 '18 at 06:44
-