Transparent scrollbar

雨燕双飞 提交于 2020-01-03 12:30:21

问题


How to make scrollbar transparent? Only css. Only for webkit browsers. My code here.

   div{
  width:410px;
  height:100px;
  overflow-y:overlay;
  border:1px solid green;
  position:relative;
}

::-webkit-scrollbar{
  width:20px;
} 

::-webkit-scrollbar-thumb{
  background-color:rgba(0,0,0,1);
}  

回答1:


div
{
  width:410px;
  height:100px;
  overflow-y:overlay;
  border:1px solid green;
  position:relative;
}

::-webkit-scrollbar{
  width:20px;
} 

::-webkit-scrollbar-thumb{
   background-color: rgba(255,255,255,1);

}  



回答2:


If you end up wanting it cross-browser, see my question from last week.

Here's the JSBin to go with it.



来源:https://stackoverflow.com/questions/19603141/transparent-scrollbar

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