VUE修改scrollbar滑动条样式
解决方案
- 写在App.vue中全局使用,否在要在::前加类名
- 谷歌有效,火狐无效
::-webkit-scrollbar{
width: 10px;
height: 1px;
}
/* 滑块 */
::-webkit-scrollbar-thumb{
border-radius: 5px;
background-color: rgba(0, 0, 0, 0.2);
}
/* 轨道 */
::-webkit-scrollbar-track{
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #ededed;
border-radius: 5px;
}
参考地址
[1]: https://www.cnblogs.com/changx/p/12849360.html