gpt4 book ai didi

css - 自定义滚动条不适用于 Firefox

转载 作者:行者123 更新时间:2023-11-28 15:35:47 25 4
gpt4 key购买 nike

我创建了一个网站。我自定义了主垂直滚动条。

它在 Google Chrome 和 Safari 上运行良好,但在 Mozilla Firefox 上运行不佳。

你有解决这个问题的想法吗?

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;
}

谢谢。

最佳答案

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

关于css - 自定义滚动条不适用于 Firefox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12414296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com