修改浏览器默认滚动条样式

/* 修改浏览器默认滚动条样式 */
body{
      scrollbar-arrow-color: transparent!important; /*上下按钮上三角箭头的颜色*/
      scrollbar-face-color: transparent!important; /*滚动条凸出部分的颜色*/
      scrollbar-3dlight-color: transparent!important; /*滚动条亮边的颜色*/
      scrollbar-highlight-color: transparent!important; /*滚动条空白部分的颜色*/
      scrollbar-shadow-color: transparent!important; /*滚动条阴影的颜色*/
      scrollbar-darkshadow-color: transparent!important; /*滚动条强阴影的颜色*/
      scrollbar-track-color: transparent!important; /*滚动条背景颜色*/

      scrollbar-base-color: transparent!important; /*滚动条的基本颜色*/
      Cursor:url(mouse.cur); /*自定义个性鼠标*/
      /*以上2项适用与:body、div、textarea、iframe*/
  }


  ::-webkit-scrollbar {  /* 滚动条整体部分 */
      width:14px;
      margin-right:2px
  }
  /* 滚动条两端的按钮样式 start */
  	::-webkit-scrollbar-button {
	    display: block; 
	} 
	::-webkit-scrollbar-button:horizontal:single-button:start {
	    width:14px;  
	    background: url(../img/scroll-top.png) no-repeat;
	    cursor: pointer;
	}
	::-webkit-scrollbar-button:horizontal:single-button:end {
	    width:14px;
	    background: url(../img/scroll-bottom.png) no-repeat;
	    cursor: pointer;
	}
	::-webkit-scrollbar-button:vertical:single-button:start {
	    width: 10px;
	    background: url(../img/scroll-top.png) no-repeat;
	    cursor: pointer;
	}
	::-webkit-scrollbar-button:vertical:single-button:end {
	    width: 10px;
	    background: url(../img/scroll-bottom.png) no-repeat;
	    cursor: pointer;
	}
  /* 滚动条两端的按钮 end */
  ::-webkit-scrollbar:horizontal {
      height:10px;
      margin-bottom:2px
  }
  ::-webkit-scrollbar-track {  /* 外层轨道 */
      border-radius: 10px;
  }
  ::-webkit-scrollbar-track-piece {  /*内层轨道,滚动条中间部分 */
      background-color: transparent!important;
      border-radius: 10px;
  }
  ::-webkit-scrollbar-thumb {  /* 滑块 */
      width:14px;
      height:30px;
      border-radius: 5px;
      background: #005880!important;
      position:absolute;
  }
  ::-webkit-scrollbar-corner { /* 边角 */
      width:14px;
      background-color: red;
  }
  ::-webkit-scrollbar-thumb:hover { /* 鼠标移入滑块 */
      background: #005880;
  }

 效果:

       

 

转载于:https://www.cnblogs.com/i-want-to-be-like-an-sun/p/7615640.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值