Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-webkit-overflow-scrolling: touch breaks my -webkit-scrollbar css in iOS

This code works great for styling scrollbars:

.frame::-webkit-scrollbar {
    -webkit-appearance: none;
    background-color: #000;
}
.frame::-webkit-scrollbar:horizontal {
    height: 6px;
}
.frame::-webkit-scrollbar-thumb {
    background-color: #000;
}
.frame::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    background-color: #333;
}

But everytime i want to make it touch enabled (for easing in the mobile scrolling), all scrollbars disappear

.frame {
    -webkit-overflow-scrolling: touch;
}

Any solution to keep the scrollbar in iOS or mobiles?

like image 437
Bengala Avatar asked Mar 05 '15 06:03

Bengala


1 Answers

You can either custom style your scrollbars with css for webkit browsers or enable

    -webkit-overflow-scrolling: touch;

Both of them doesnt work together in latest safaris. If you put both only touch will work. Tested in Iphone 5 and 6

like image 72
sounakpal Avatar answered Oct 22 '22 20:10

sounakpal