Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Always show scrollbars in iPhone/Android [duplicate]

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 ?

like image 697
Jagadeesh J Avatar asked Sep 05 '14 11:09

Jagadeesh J


People also ask

Why do I have 2 scroll bars?

You're basically getting a double scrollbar because your giving the body min-height of 100vh AND setting an overflow. It appears this was done to keep the menu in the correct position on mobile devices. That fixed things in Chrome, I assume other browsers as well but I didn't do any heavy testing.

How do I get scroll bar on iPhone?

Answer: A: Answer: A: Open System Preferences > General. Change "Show scroll bars:" to Always.


1 Answers

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; 
}
like image 191
user2169710 Avatar answered Oct 27 '22 23:10

user2169710