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"
Example
#.team-photo {
background: #0ea5e9 url("/img/team.webp") center / cover;
background-blend-mode: luminosity;
}<div class="team-photo" style="height: 140px; border-radius: 12px; background: #0ea5e9 url('/collections/covers/programowanie-dla-dzieci.webp') center / cover; background-blend-mode: luminosity;"></div>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
#background-blend-mode: <blend-mode> [, <blend-mode>]*;Values
#- The photo covers the background colour.
- The photo tinted purple and darkened.
- The photo lightened by the colour.
- Brightness from the photo, hue from the background colour. A duotone effect.
Values in practice
#normal
.demo { background-blend-mode: normal; }multiply
.demo { background-blend-mode: multiply; }screen
.demo { background-blend-mode: screen; }luminosity
.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
luminositymode. - The mode has no effect if the element doesn’t have at least two background layers to blend.
Related entries
#- mix-blend-modeSets how an element’s colours blend with what lies beneath it.
- backgroundA shorthand that sets all background properties in one declaration.
- background-imageSets an image or gradient as an element’s background.
- filterApplies graphical effects to an element: blur, brightness, contrast, greyscale and more.
Spotted a mistake or missing an example? Write to us.