小编Тат*_*ёва的帖子

滚动条覆盖内容

我想制作透明的滚动条,它应该放在带有内容的div上.只有css和webkit浏览器.它看起来像是一个例子.我的代码.问题是滚动条将内容移动到左侧.如何让它看起来像在例子中?谢谢你的回复.

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

::-webkit-scrollbar{
  width:20px;
  position:absolute;
  right:20px;
  z-index:100;
} 

::-webkit-scrollbar-thumb{
  background-color:rgba(0,0,0,1);
  border-right:10px solid white;
}  
Run Code Online (Sandbox Code Playgroud)

webkit scrollbar css3

6
推荐指数
1
解决办法
2649
查看次数

透明滚动条

如何使滚动条透明?只有css.仅适用于webkit浏览器.我的代码在这里.

   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);
}  
Run Code Online (Sandbox Code Playgroud)

webkit scrollbar css3

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

css3 ×2

scrollbar ×2

webkit ×2