Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

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

搜尋 Mozilla 技術支援網站

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

了解更多

change default image style

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

more options

I used the add-on "Old Default Image Style" for years to display image files in Firefox so that they would not be automatically centred on a black background which is the default. After upgrading to Quantum, the add-on is no longer supported. Is there any way modify the default image display to turn off the default centering and black background?

This is my only issue with the upgrade so far.

Thanks!

I used the add-on "Old Default Image Style" for years to display image files in Firefox so that they would not be automatically centred on a black background which is the default. After upgrading to Quantum, the add-on is no longer supported. Is there any way modify the default image display to turn off the default centering and black background? This is my only issue with the upgrade so far. Thanks!

被選擇的解決方法

This is a bit tricky because the only way I know to override the dark background on stand-alone image pages is going to affect all pages. That said, most pages either specify a body background color or leave it white, so perhaps that's not a problem?

@media not print{
  /* De-center the image if it's the very first element in a page body */
  body > img {
    margin: 0 !important;
  }
  /* Create a global off-white background */
  html {
    background-color: #fafafa !important;
  }
}

That style rule would go into a userContent.css file. More info on that file: http://kb.mozillazine.org/UserContent.css

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

所有回覆 (2)

more options

選擇的解決方法

This is a bit tricky because the only way I know to override the dark background on stand-alone image pages is going to affect all pages. That said, most pages either specify a body background color or leave it white, so perhaps that's not a problem?

@media not print{
  /* De-center the image if it's the very first element in a page body */
  body > img {
    margin: 0 !important;
  }
  /* Create a global off-white background */
  html {
    background-color: #fafafa !important;
  }
}

That style rule would go into a userContent.css file. More info on that file: http://kb.mozillazine.org/UserContent.css

more options

That works very well! Thanks for your incredibly fast reply. I appreciate your help.