美文网首页
如何去掉滚动条scroll bar 在window系统的Chro

如何去掉滚动条scroll bar 在window系统的Chro

作者: 小宝薯 | 来源:发表于2018-08-24 16:35 被阅读117次

windows下的Chrome浏览器里 scroll bar 滚动条长这个挫样子:

默认样式 隐藏后 gif

一、隐藏sacroll bar滚动条样子的css代码:

/*webkit内核*/
.scroll-content::-webkit-scrollbar {
    width:0px;
    height:0px;
}
.scroll-content::-webkit-scrollbar-button    {
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar-track     {
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar-track-piece {
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar-thumb{
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar-corner {
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar-resizer  {
    background-color:rgba(0,0,0,0);
}
.scroll-content::-webkit-scrollbar {
    width:10px;
    height:10px;
}

二、需要的时候给父元素添加class类

<div class="scroll-content">
// ....你的元素代码
</div>

万事大吉,顺眼多了
开森!!!


开森

相关文章

网友评论

      本文标题:如何去掉滚动条scroll bar 在window系统的Chro

      本文链接:https://www.haomeiwen.com/subject/uxfiiftx.html