CSS background-blend-mode

The background-blend-mode property in CSS defines how multiple background images or colors blend together. This property allows for creative effects by combining layers of images or colors using different blend modes, similar to blending options in graphic design software.


Syntax of background-blend-mode

</>
Copy
background-blend-mode: normal | multiply | screen | overlay | darken | lighten | color-dodge | saturation | color | luminosity;

Values

ValueDescription
normalBackground layers do not blend; they are displayed as is. This is the default value.
multiplyMultiplies the colors of the background layers, resulting in a darker output.
screenBrightens the colors by blending them inversely.
overlayCombines multiply and screen modes to enhance contrast.
darkenRetains the darker colors from both layers.
lightenRetains the lighter colors from both layers.
color-dodgeBrightens the base layer depending on the blend layer.
saturationApplies the saturation of the blend layer to the base layer while retaining the base layer’s hue and luminosity.
colorApplies the hue and saturation of the blend layer while retaining the base layer’s luminosity.
luminosityApplies the luminosity of the blend layer while retaining the base layer’s hue and saturation.

Default Value

normal


Examples for background-blend-mode

Using the CSS background-blend-mode Property

The following examples demonstrate how to use different blend modes with the background-blend-mode property to achieve various effects.

</>
Copy
/* Default: normal */
.element {
  background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
  background-blend-mode: normal;
}

/* Multiply blend mode */
.element {
  background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
  background-blend-mode: multiply;
}

/* Screen blend mode */
.element {
  background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
  background-blend-mode: screen;
}

Example for Multiply Blend Mode

Below is an example demonstrating the background-blend-mode: multiply effect:

index.html

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  body {
    margin: 0;
    font-family: Arial, sans-serif;
  }

  .blend {
    height: 400px;
    background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
  }
</style>
</head>
<body>

<div class="blend">Multiply Blend Mode</div>

</body>
</html>

Example for Darken Blend Mode

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  body {
    margin: 0;
    font-family: Arial, sans-serif;
  }

  .blend {
    height: 400px;
    background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
    background-blend-mode: darken;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
  }
</style>
</head>
<body>

<div class="blend">Darken Blend Mode</div>

</body>
</html>

Example for Lighten Blend Mode

</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
  body {
    margin: 0;
    font-family: Arial, sans-serif;
  }

  .blend {
    height: 400px;
    background-image: url('https://www.tutorialkart.com/img/mountains.jpg'), url('https://www.tutorialkart.com/img/lion.jpg');
    background-blend-mode: lighten;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
  }
</style>
</head>
<body>

<div class="blend">Lighten Blend Mode</div>

</body>
</html>

Browser Support

The background-blend-mode property is supported in most modern browsers. Below is a compatibility table:

BrowserVersion
Chrome35.0
Edge79.0
Firefox30.0
Safari7.1
Opera22.0