浏览器滚动条默认样式修改

效果如下 直接贴代码了 .sidebar { z-index: 1024; position: fixed; left: 0; top: 64px; overflow-y: auto; overflow-x: hidden; background-co...

效果如下

直接贴代码了

.sidebar {
    z-index: 1024;
    position: fixed;
    left: 0;
    top: 64px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #001529;
  }
  .sidebar::-webkit-scrollbar-track { /* 定义滚动条轨道  内阴影+圆角*/
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    background-color: #f5f5f5;
  }

  .sidebar::-webkit-scrollbar { /*滚动条整体样式*/
    width: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
  }

  .sidebar::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
    border-radius: 5px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    background-color: #555;
  }
  • 发表于 2019-08-07 15:40
  • 阅读 ( 204 )
  • 分类:网络文章

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除