為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Change Firefox background when navigating pages

  • 5 回覆
  • 1 有這個問題
  • 2 次檢視
  • 最近回覆由 epomatti

more options

Hi

I have dark mode installed for almost every site that I use.

When I navigate from one page to the other the background of Firefox is set to the white color, and switching from black to white, and immediately back to black is aggressive to the eyes.

How can I change the background color of Firefox before the page has loaded?

Thanks.

Hi I have dark mode installed for almost every site that I use. When I navigate from one page to the other the background of Firefox is set to the white color, and switching from black to white, and immediately back to black is aggressive to the eyes. How can I change the background color of Firefox before the page has loaded? Thanks.

被選擇的解決方法

Could I suggest asking about the problem on the Github site? Giving specific page examples for comparison might help.

https://github.com/overdodactyl/ShadowFox/issues

從原來的回覆中察看解決方案 👍 0

所有回覆 (5)

more options

Hi epomatti, the empty frame that the web content goes into normally has a white background. Traditionally, you would create a userChrome.css file to apply a custom background color. It sounds as though Firefox's Dark theme doesn't do that yet, and it still needs to be done the old-fashioned way.

There is a project called ShadowFox that includes this and numerous other style rules to dark theme as much of Firefox as possible: https://overdodactyl.github.io/ShadowFox/

If you don't want to use all of that, just the one change, I could figure out which rule it is, or you could check the following subreddit where the question comes up from time to time: https://www.reddit.com/r/FirefoxCSS/

more options

Hi Jscher

I installed it but there still is a small gap where (I assume) the page CSS is not loaded yet, and the background of the page is white for a short second.

Can that be changed as well?

more options

選擇的解決方法

Could I suggest asking about the problem on the Github site? Giving specific page examples for comparison might help.

https://github.com/overdodactyl/ShadowFox/issues

more options

Try to add code to the userContent.css file.


/* about:blank */
@-moz-document url(about:blank){html,body{background-color:#ddd!important}}
more options

cor-el said

Try to add code to the userContent.css file.
/* about:blank */
@-moz-document url(about:blank){html,body{background-color:#ddd!important}}

It didn't work.