其他分享
首页 > 其他分享> > css设置滚动条样式

css设置滚动条样式

作者:互联网

 

//横向滚动条
.rongyuChoose {
   overflow-x: scroll; 
 }
 
 .rongyuChoose::-webkit-scrollbar {
      /*滚动条整体样式*/
      width: 100px;
      /*高宽分别对应横竖滚动条的尺寸*/
      height: 6px; 
    }
    .rongyuChoose::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      border-radius: 10px;
      background-color: #86a9f1;
      background-image: -webkit-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
      );
    }
    .rongyuChoose::-webkit-scrollbar-track {
      /*滚动条里面轨道*/
      -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
      background: #e9ecf0;
    }

 

标签:样式,0.2,滚动条,rgba,webkit,rongyuChoose,css,255
来源: https://www.cnblogs.com/liyunxi/p/16543868.html