vue中改变滚动条样式(CSS)

scrollbar.css

@charset "utf-8";
::-webkit-scrollbar  
{  
    width: 5px;  
}
  
/*定义滚动条轨道 内阴影+圆角*/  
::-webkit-scrollbar-track  
{  
    border-radius: 10px;  
    background-color: rgba(0,0,0,0.1); 
} 
  
/*定义滑块 内阴影+圆角*/  
::-webkit-scrollbar-thumb  
{  
    border-radius: 10px;  
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);  
    background-color: rgba(0,0,0,0.1);
} 

在 index.html中引入样式

<link rel="stylesheet" href="static/css/scrollbar.css">

本文作者:TwcatL_tree

本文链接:https://www.cnblogs.com/twcat/p/16912618.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   TwcatL_tree  阅读(652)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起