Firefox的自定义CSS滚动条 [英] Custom CSS Scrollbar for Firefox
问题描述
我想使用CSS自定义滚动条。
I want to custom-style a scrollbar with CSS.
我使用这个WebKit CSS代码,适用于Safari和Chrome:
I use this WebKit CSS code, which works well for Safari and Chrome:
::-webkit-scrollbar {
width: 15px;
height: 15px;
}
::-webkit-scrollbar-track-piece {
background-color: #C2D2E4;
}
::-webkit-scrollbar-thumb:vertical {
height: 30px;
background-color: #0A4C95;
}
如何为Firefox做同样的事情?
How can I do the same thing for Firefox?
(我知道我可以很容易地使用jQuery,但我宁愿用CSS做它是可行的。)
(I know I can easily do it using jQuery, but I would prefer to do it with CSS if it's doable.)
感谢某人的专家建议!
推荐答案
没有Firefox(Gecko)
There's no Firefox (Gecko) equivalent to ::-webkit-scrollbar
and friends.
你必须坚持使用jQuery。
You'll have to stick with jQuery.
很多人都喜欢这个功能,请参阅: https://bugzilla.mozilla.org /show_bug.cgi?id=77790
Plenty of people would like this feature, see: https://bugzilla.mozilla.org/show_bug.cgi?id=77790
此报告要求您提出的同样问题: a href =https://bugzilla.mozilla.org/show_bug.cgi?id=547260> https://bugzilla.mozilla.org/show_bug.cgi?id=547260
This report is asking for the exact same thing you're asking for: https://bugzilla.mozilla.org/show_bug.cgi?id=547260
它已关闭,作为我链接到的第一个报告的副本。
It was closed as a duplicate of the first report I linked to.
这篇关于Firefox的自定义CSS滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!