简体   繁体   English

自定义滚动条不适用于Firefox

[英]Customized Scrollbar doesn't work for Firefox

I created a website. 我创建了一个网站。 I customized the main vertical scrollbar. 我自定义了主垂直滚动条。

It works good on Google Chrome and Safari but not in Mozilla Firefox. 它在Google Chrome和Safari上效果很好,但在Mozilla Firefox中效果不佳。

Do you have any idea to fix this problem ? 您是否有解决此问题的想法?

CSS CODE CSS代码

::-webkit-scrollbar {                                   
    width: 10px;
    height: 6px;
    background: #FFF url(images/bg-blog-repeat.png) 0 0 repeat;
}


::-webkit-scrollbar-thumb {                             
    border: solid 0 transparent;
    border-right-width: 4px;
    -webkit-border-radius: 5px;
    -webkit-border-top-right-radius: 9px 5px;
    -webkit-border-bottom-right-radius: 9px 5px;
    -webkit-box-shadow: inset 0 0 0 1px rgb(79,79,79), inset 0 0 0 6px rgb(102,102,102);
}
::-webkit-scrollbar-thumb:hover {                       
    -webkit-box-shadow: inset 0 0 0 1px rgb(90,90,90), inset 0 0 0 6px rgb(110,110,110);
}
::-webkit-scrollbar-thumb:horizontal {                  
    border-right-width: 0;
    border-bottom-width: 2px;
    -webkit-border-top-right-radius: 5px;
    -webkit-border-bottom-right-radius: 5px 9px;
    -webkit-border-bottom-left-radius: 5px 9px;
}
::-webkit-scrollbar-corner {                            
    background: #FFF url(images/bg-blog-repeat.png) 0 0 no-repeat;
}

body ::-webkit-scrollbar {
    background: transparent none;
}

Thanks. 谢谢。

对于以-webkit-开头的每一行,请编写完全相同的另一行,将-webkit-替换为-moz-

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM