搜尋 Mozilla 技術支援網站

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

Learn More

background-blend-mode is no longer functioning as it should with color option

  • 1 回覆
  • 0 有這個問題
  • 23 次檢視
  • 最近回覆由 zeroknight

more options

Hi,

I created a website with a pretty simple css in the body of the page. I have a background image, but its colors are too dominant, so I also added a background color property to make the background more "pale". This approach worked perfectly in Chrome and I am 99% sure that I also tested this back then in Firefox and it worked as expected.

Now, only a white background is displayed in Firefox (Chrome works perfectly), which is interesting, because nor the image nor the set colour is white (well... the colour is white, but it is semi transparent). Did I miss something or is this an accidentally added bug in Firefox?

For your reference I attach a minimal working (in Chrome the paler background is displayed properly, in Firefox white page) example (note: change image url to whatever):

html:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <script src="script.js"></script>
</body>
</html>

css:
body{
    height: 100vh;
    width: 100vw;
    justify-content: center;
    align-items: center;
    display: flex;
    margin: 0;
    flex-direction: column;
    background-image: url(./resources/splash.jpg);
    background-position: center;
    background-size: cover;
    background-color:  rgba(255,255,255,0.1);
    background-blend-mode:color;
}

I appreciate the help, Mark

Hi, I created a website with a pretty simple css in the body of the page. I have a background image, but its colors are too dominant, so I also added a background color property to make the background more "pale". This approach worked perfectly in Chrome and I am 99% sure that I also tested this back then in Firefox and it worked as expected. Now, only a white background is displayed in Firefox (Chrome works perfectly), which is interesting, because nor the image nor the set colour is white (well... the colour is white, but it is semi transparent). Did I miss something or is this an accidentally added bug in Firefox? For your reference I attach a minimal working (in Chrome the paler background is displayed properly, in Firefox white page) example (note: change image url to whatever): html: <pre><nowiki><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="styles.css"> </head> <body> <script src="script.js"></script> </body> </html> css: body{ height: 100vh; width: 100vw; justify-content: center; align-items: center; display: flex; margin: 0; flex-direction: column; background-image: url(./resources/splash.jpg); background-position: center; background-size: cover; background-color: rgba(255,255,255,0.1); background-blend-mode:color; } </nowiki></pre><br> I appreciate the help, Mark

由 cor-el 於 修改

所有回覆 (1)

more options

It works for me. Blending can be affect by graphics driver bugs, does it still happen in Troubleshoot Mode?

有幫助嗎?

問個問題

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