CSS propertyEffects

background-blend-mode

Blends an element’s background layers together: images, gradients and colour.

Initial value
normal
Inherited
No
Animatable
no
Applies to
all elements
JavaScript
element.style.backgroundBlendMode = "multiply"
On this page

Example

#
CSS
.team-photo {
  background: #0ea5e9 url("/img/team.webp") center / cover;
  background-blend-mode: luminosity;
}
Preview

Definition and usage

#

The background-blend-mode property works like mix-blend-mode, but only within a single element’s background. It blends successive background-image layers and background-color together, without affecting the element’s content or what lies beneath it.

It lets you tint a photo in a brand colour without preparing a separate file: you just need the photo as a background image, the colour as background-color and the multiply or luminosity mode.

You can give several modes separated by commas, one for each image layer.

Syntax

#
Syntax
background-blend-mode: <blend-mode> [, <blend-mode>]*;

Values

#
  • normal

    The photo covers the background colour.
  • multiply

    The photo tinted purple and darkened.
  • screen

    The photo lightened by the colour.
  • luminosity

    Brightness from the photo, hue from the background colour. A duotone effect.

Values in practice

#

normal

The photo covers the background colour.
.demo { background-blend-mode: normal; }

multiply

The photo tinted purple and darkened.
.demo { background-blend-mode: multiply; }

screen

The photo lightened by the colour.
.demo { background-blend-mode: screen; }

luminosity

Brightness from the photo, hue from the background colour. A duotone effect.
.demo { background-blend-mode: luminosity; }

Browser support

#

Widely available

Works in all modern browsers, phones included. You can use it without worry.

  • Chrome
  • Edge
  • Firefox
  • Safari

Good practices

#
  • You get a uniform colour effect on photos from different sources with the same background colour and the luminosity mode.
  • The mode has no effect if the element doesn’t have at least two background layers to blend.

Related entries

#

Spotted a mistake or missing an example? Write to us.