webkit浏览器自定义滚动条样式代码
/滚动条宽度/
::-webkit-scrollbar {
width: 8px;
}
/* 轨道样式 */
::-webkit-scrollbar-track {
}
/* Handle样式 */
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(0,0,0,0.2);
}
/当前窗口未激活的情况下/
::-webkit-scrollbar-thumb:window-inactive {
background: rgba(0,0,0,0.1);
}
/hover到滚动条上/
::-webkit-scrollbar-thumb:vertical:hover{
background-color: rgba(0,0,0,0.3);
}
/滚动条按下/
::-webkit-scrollbar-thumb:vertical:active{
background-color: rgba(0,0,0,0.7);
}
/横竖滚动条交角/
::-webkit-scrollbar-corner {
background-color: #F3F3F3;
}
/横竖滚动条交角图案/
::-webkit-resizer {
/background-image: url(/public/img/resizer-inactive.png);/
background-repeat: no-repeat;
background-position: bottom right;
}
::-webkit-scrollbar-track-piece{
background-color:#F3F3F3; /滑道/
-webkit-border-radius:4px; /滑道圆角宽度/
}
Body {}{
scrollbar-arrow-color: #f4ae21; ///三角箭头的颜色/
scrollbar-face-color: #333; ///立体滚动条的颜色/
scrollbar-3dlight-color: #666; ///立体滚动条亮边的颜
色/
scrollbar-highlight-color: #666; ///滚动条空白部分的
颜色/
scrollbar-shadow-color: #999; ///立体滚动条阴影的颜
色/
scrollbar-darkshadow-color: #666; ///立体滚动条强阴
影的颜色/
scrollbar-track-color: #666; ///立体滚动条背景颜色/
scrollbar-base-color:#f8f8f8; ///滚动条的基本颜色/
Cursor:url(mouse.cur); /**//自定义个性鼠标/
}