I tried setting the visibility of the scrollbar thumb via jquery like so:
$('-webkit-scrollbar-thumb').css('visibility', 'hidden')
But it didn't actually do anything. Here's my CSS Definition:
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
background: rgba(150, 150, 150, 0.8);
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
border-radius: 2;
margin: 5px;
}
I can't disable scrolling by hiding the overflow because I still need scrolling enabled, I just need to hide the scrollbar thumb through javascript.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…