Hide scrollbar track but show scrollbar-thumb

倾然丶 夕夏残阳落幕 提交于 2020-01-02 20:30:49

问题


Good evening! I just wanna to change my scroll like this.

So it looks like that track is hidden. I got my style like this

::-webkit-scrollbar{
   width: 15px;
   height: 40px;
}

::-webkit-scrollbar-thumb{
   background-color: #DBDBDB;
   border: 4px solid transparent;
   border-radius: 11px;
   background-clip: content-box;
}

::-webkit-scrollbar * {
   background: transparent;
}

::-webkit-scrollbar-thumb:vertical {
   height: 90px;
}

And I got such result:

So there is a question. How can I do this with CSS or JS maybe. Thanks

来源:https://stackoverflow.com/questions/42634451/hide-scrollbar-track-but-show-scrollbar-thumb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!