Home  >  Article  >  Web Front-end  >  css _滚动条样式_html/css_WEB-ITnose

css _滚动条样式_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:591587browse

/*滚动条整体部分  定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
        ::-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;
        }

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn