X
點擊此處開啟此網站的行動版。

技術支援討論區

Change Firefox background when navigating pages

已張貼

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
引用

額外的系統細節

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

更多資訊

jscher2000
  • Top 10 Contributor
8509 個解決方法 69508 個答案

有幫助的回覆

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/

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/
這篇文章有幫助嗎? 1
引用

提出問題者

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?

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?
這篇文章有幫助嗎?
引用
jscher2000
  • Top 10 Contributor
8509 個解決方法 69508 個答案

選擇的解決方法

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

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
這篇文章有幫助嗎?
引用
cor-el
  • Top 10 Contributor
  • Moderator
17273 個解決方法 156142 個答案

Try to add code to the userContent.css file.


/* about:blank */
@-moz-document url(about:blank){html,body{background-color:#ddd!important}}
Try to add code to the <b>userContent.css</b> file. *http://kb.mozillazine.org/userContent.css <hr> <pre><nowiki>/* about:blank */ @-moz-document url(about:blank){html,body{background-color:#ddd!important}} </nowiki></pre> *https://www.userchrome.org/what-is-userchrome-css.html *https://www.userchrome.org/how-create-userchrome-css.html
這篇文章有幫助嗎? 0
引用

提出問題者

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.

''cor-el [[#answer-1229978|said]]'' <blockquote> Try to add code to the <b>userContent.css</b> file. *http://kb.mozillazine.org/userContent.css <hr> <pre><nowiki>/* about:blank */ @-moz-document url(about:blank){html,body{background-color:#ddd!important}} </nowiki></pre> *https://www.userchrome.org/what-is-userchrome-css.html *https://www.userchrome.org/how-create-userchrome-css.html </blockquote> It didn't work.
這篇文章有幫助嗎?
引用
問個問題

如果您還沒有帳號,您必須先 登入您的帳號 來回覆文章。請 開始一個新問題