我正在尝试使用以下命令更改Firefox URL栏的背景颜色 userChrome.css . 下列的 these steps ,我将下面的代码添加到我的 userChrome.css :
userChrome.css
@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { #urlbar { background-color: red !important; } }
它根本不起作用。我怎样才能做到呢?
首先,您需要设置 toolkit.legacyUserProfileCustomizations.stylesheets 偏爱 true 在里面 about:config ,如上所述 here .
toolkit.legacyUserProfileCustomizations.stylesheets
true
about:config
现在,要使用的正确CSS标识符是 #urlbar-background :
#urlbar-background
@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { #urlbar-background{ background-color: red !important; } }
(这是我从学校学到的 this file