css _滚动条样式

/*滚动条整体部分  定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
        ::-webkit-scrollbar
        {
            width: 12px;
        }
        
        /* 滚动条的轨道  内阴影+圆角*/
        ::-webkit-scrollbar-track
        {
            -webkit-box-shadow: inset 0 0 6px #929C9C;
            -webkit-border-radius: 5px;
            border-radius: 5px;
        }
        
        /* 滚动条里面的滑块 内阴影+圆角*/
        ::-webkit-scrollbar-thumb
        {
            -webkit-border-radius: 5px;
            border-radius: 5px;
            background: inset 0 0 6px #00ABA2;
            -webkit-box-shadow: inset 0 0 6px #00ABA2;
        }
        /*当焦点不在当前区域滑块的状态*/
        ::-webkit-scrollbar-thumb:window-inactive
        {
            background: rgba(255,0,0,0.4);
        }
        /*滚动条上半边或左半边
        ::-webkit-scrollbar-track-piece:start
        {
            background: rgba(11,10,100,0.4);
        }*/
        ::-webkit-scrollbar-thumb:hover
        {
            -webkit-border-radius: 6px;
            border-radius: 5px;
            background: inset 0 0 6px #00ABA2;
            -webkit-box-shadow: inset 0 0 8px #00ABA2;
        }

posted @ 2015-07-03 14:21  CanIHelpYou?  阅读(575)  评论(1编辑  收藏  举报