滚动条样式调整
1.\public\css\custom.css
/*滚动条STR*/ /* 滚动条的宽度 */ ::-webkit-scrollbar { width: 10 px; } /* 灰色,但是透明度为0,即完全透明(透明度未指定,默认为1,即完全不透明)。 !important表示这个样式规则具有最高优先级,将覆盖其他相同属性的样式规则。 */ /* 滚动条的轨道 */ ::-webkit-scrollbar-track { background-color: rgba(232, 232, 232, 1) !important; } /* 滚动条的拇指 */ ::-webkit-scrollbar-thumb { background-color: rgba(136, 136, 136, 1) !important; } /* 当鼠标悬停在滚动条 */ ::-webkit-scrollbar-thumb: hover { background-color: rgba(100, 100, 100, 1) !important; } /* 滚动条在被点击时 */ ::-webkit-scrollbar-thumb: active { background-color: rgba(100, 100, 100, 1) !important; } /*滚动条END*/
2.\src\APP.vue
::-webkit-scrollbar { width: .5em; height: .5em; background-color: transparent; border-radius: 0; } //修改第4个参数(透明度) ::-webkit-scrollbar-thumb { background-color: #000000; background-color: rgba(0, 0, 0, 0.05); border-radius: 0; } //修改第4个参数(透明度) ::-webkit-scrollbar-thumb:hover { background-color: #000000; background-color: rgba(0, 0, 0, 0.35); }
选择上面两种方式其一即可。
如有帮助希望点个推荐;如果没帮助到或者内容有错误,可以下面留言,谢谢!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)