zoukankan      html  css  js  c++  java
  • css-自定义滚动条

    <template>
      <div style=" 50%;height: 100%;overflow-y: auto" class="zm-scrollbar">
        <div style="height: 6000px"></div>
      </div>
    </template>
    
    <script>
      export default {
        name: "a17"
      }
    </script>
    
    <style>
      .zm-scrollbar {
        --scrollbar- 0px;
        cursor: pointer;
      }
    
      .zm-scrollbar * {
        cursor: auto;
      }
    
      .zm-scrollbar:hover {
        --scrollbar- 8px;
      }
    
      /*滚动条整体*/
      .zm-scrollbar::-webkit-scrollbar {
         var(--scrollbar-width);
      }
    
      /*滑轨样式*/
      .zm-scrollbar::-webkit-scrollbar-track {
        box-shadow: 0 0 calc(var(--scrollbar-width) / 2) #cccccc inset;
        border-radius: calc(var(--scrollbar-width) / 2);
      }
    
      /*滑块样式*/
      .zm-scrollbar::-webkit-scrollbar-thumb {
        border-radius: calc(var(--scrollbar-width) / 2);
        background-color: #999999;
      }
    
      .zm-scrollbar::-webkit-scrollbar-thumb:hover {
        background-color: #666666;
      }
    </style>
    
  • 相关阅读:
    km算法
    HDU 1358
    HDU 3746
    CF 432D
    HDU 4725
    14年百度之星资格赛第四题
    AC自动机
    RMQ
    HDU 4635
    HDU 3667
  • 原文地址:https://www.cnblogs.com/linding/p/14990575.html
Copyright © 2011-2022 走看看