zoukankan      html  css  js  c++  java
  • css修改滚动条默认样式【css笔记】

    HTML

    <div class="inner">
        <div class="innerbox">
            <p style="height:200px;">这是内容111</p>
            <p style="height:400px;">这里是内容222</p>
            <p>这里是内容333</p>
        </div>
    </div>

    css代码

    .inner{
                width: 265px;
                height: 400px;
                position: absolute;
                top: 33px;
                left: 13px;
                /*cursor: pointer;*/
                overflow:hidden;
    }
    .innerbox{
                overflow-x: hidden;
                overflow-y: auto;
                color: #000;
                font-size: .7rem;
                font-family: "5FAE8F6F96C59ED1",Helvetica,"黑体",Arial,Tahoma;
                height: 100%;
            }
            /*滚动条样式*/
            .innerbox::-webkit-scrollbar {/*滚动条整体样式*/
                width: 4px;     /*高宽分别对应横竖滚动条的尺寸*/
                height: 4px;
            }
            .innerbox::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
                border-radius: 5px;
                -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
                background: rgba(0,0,0,0.2);
            }
            .innerbox::-webkit-scrollbar-track {/*滚动条里面轨道*/
                -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
                border-radius: 0;
                background: rgba(0,0,0,0.1);
            }

    学习一直在路上。。。。。

    “想要越幸运,就要越努力”
  • 相关阅读:
    关于git
    关于 素材,设计
    utiles
    sqlite
    蓝牙
    一个简单的Maven小案例
    【日志卡住不动】Registering current configuration as safe fallback point
    一分钟部署nacos
    生产日志文件太大NotePad++无法打开
    idea 安装 codota 插件
  • 原文地址:https://www.cnblogs.com/HollyLearning/p/7659756.html
Copyright © 2011-2022 走看看