css鼠标悬停改变滚动条样式

::-webkit-scrollbar {
  /*滚动条整体样式*/
  height: 13px !important; /*高宽分别对应横竖滚动条的尺寸*/
  width: 13px !important;
}

::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  border-radius: 10px;
  border-style: dashed;
  background-color: rgba(157, 165, 183, 0.4);
  border-color: transparent;
  border-width: 2px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(157, 165, 183, 0.7);
}

::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  -webkit-box-shadow: inset 0 0 5px rgba(240, 240, 240, 0);
  border-radius: 0;
  background: rgba(240, 240, 240, 0);
  cursor: pointer;
}

 

posted @ 2022-04-15 16:22  点滴一言  阅读(366)  评论(0编辑  收藏  举报