zoukankan      html  css  js  c++  java
  • 笔记:css3伪选择器改变滚动条样式

    现在我打开支持前缀-webkit-的浏览器,也就是说只要支持前缀为-webkit-的浏览器才有效果

    <!doctype html>
    <html lang="en">
     <head>
      <meta charset="UTF-8">
      <title>css3伪选择器改变滚动条样式</title>
      <style>
         .thumb{
           width:300px;
           height:600px;
           overflow:auto;
         }
         .thumb::-webkit-scrollbar{
            /*滚动条整体*/
            width:10px;
            
         }
         .thumb::-webkit-scrollbar-track{
            /*滚动条里面的轨道*/
            box-shadow:inset 0 0 5px;
            border-radius:5px;
         }
         .thumb::-webkit-scrollbar-thumb{
            /*滚动条轨道里面的方块*/
            border-radius:5px;
            background-color: gray;
            background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
            background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
            background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
            background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
       
         }
      </style>
     </head>
     <body>
        <div class="thumb">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim ratione molestias obcaecati blanditiis fugit cumque atque unde delectus. Repellat quo officia dolores inventore doloremque dolor.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae, excepturi, dicta, quam sed enim electus. Repellat quo officia dolores inventore doloremque dolor.</div>
     </body>
    </html>

    Chrome

  • 相关阅读:
    内存碎片
    《大规模分布式存储系统》笔记——单机存储系统、分布式系统
    数据库的范式
    一把剪刀看懂git reset 和它的三个参数
    如何判断一个链表是否有环?以及对一些文章的错误的看法
    自由树的计数 Labeled unrooted tree counting
    C语言里的指针探析——type *name[] 在函数参数里面,是一个二维指针
    CSAPP(深入理解计算机系统)读后感
    VIM一些常用命令,方法,配置
    Latex 常用知识点存档
  • 原文地址:https://www.cnblogs.com/murenziwei/p/9328586.html
Copyright © 2011-2022 走看看