搜尋 Mozilla 技術支援網站

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

了解更多

How to change viewport background color?

  • 無回覆
  • 0 有這個問題
  • 1 次檢視
more options

If letterboxing (anti-fingerprinting) is used or when a webpage is smaller than the window (such as in about:config), Firefox fills in the rest of the window using a dark gray. I want to make it completely black.

This is what I currently have in my userContent.css

```CSS @-moz-document url-prefix("about"), url-prefix("chrome"){

 body{ background-color: rgb(0 0 0) !important };
 .sticky-container{ background-color: rgb(0 0 0) !important };
 #toolbar{ background-color: rgb(0 0 0) !important };

}@-moz-document url-prefix("about"), url-prefix("chrome"){

 body{ background-color: rgb(0 0 0) !important };
 .sticky-container{ background-color: rgb(0 0 0) !important };
 #toolbar{ background-color: rgb(0 0 0) !important };

} ```

If letterboxing (anti-fingerprinting) is used or when a webpage is smaller than the window (such as in about:config), Firefox fills in the rest of the window using a dark gray. I want to make it completely black. This is what I currently have in my userContent.css ```CSS @-moz-document url-prefix("about"), url-prefix("chrome"){ body{ background-color: rgb(0 0 0) !important }; .sticky-container{ background-color: rgb(0 0 0) !important }; #toolbar{ background-color: rgb(0 0 0) !important }; }@-moz-document url-prefix("about"), url-prefix("chrome"){ body{ background-color: rgb(0 0 0) !important }; .sticky-container{ background-color: rgb(0 0 0) !important }; #toolbar{ background-color: rgb(0 0 0) !important }; } ```
附加的畫面擷圖

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題