我正在尝试使用userChrome.css更改Firefox URL栏的背景颜色。按照这些步骤,我将以下代码添加到我的userChrome.css
(在<profile>/chrome
中):
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
#urlbar {
background-color: red !important;
}
}
它根本不起作用。我怎么才能做到呢?
首先,您需要将about:config
中的toolkit.legacyUserProfileCustomizations.stylesheets
preference设置为true
,如下所示。
#urlbar-background
:
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
#urlbar-background{
background-color: red !important;
}
}
(I learned that from this file;整个存储库很有指导意义。)