This property describes how the element’s background images should blend with each other and the element’s background color. The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough.
Overview table<normal>#
background-blend-mode: color
background-blend-mode: color-burn
background-blend-mode: color-dodge
background-blend-mode: darken
background-blend-mode: difference
background-blend-mode: exclusion
background-blend-mode: hard-light
background-blend-mode: hue
background-blend-mode: lighten
background-blend-mode: luminosity
background-blend-mode: multiply
background-blend-mode: normal
background-blend-mode: overlay
background-blend-mode: saturation
background-blend-mode: screen
background-blend-mode: soft-light
A group of boxes that show different blend effects.
<div class='normal'> <label>Normal</label> </div>
<div class='multiply'> <label>Multiply</label> </div>
<div class='screen'> <label>Screen</label> </div>
<div class='overlay'> <label>Overlay</label> </div>
<div class='darken'> <label>Darken</label> </div>
<div class='ligthen'> <label>Ligthen</label> </div>
<div class='color-dodge'> <label>Color-dodge</label> </div>
<div class='color-burn'> <label>Color-burn</label> </div>
<div class='hard-light'> <label>Hard-light</label> </div>
<div class='soft-light'> <label>Soft-light</label> </div>
<div class='difference'> <label>Difference</label> </div>
<div class='exclusion'> <label>Exclusion</label> </div>
<div class='hue'> <label>Hue</label> </div>
<div class='saturation'> <label>Saturation</label> </div>
<div class='color'> <label>Color</label> </div>
<div class='luminosity'> <label>Luminosity</label> </div>
body {
margin: 2em;
}
div {
/* In the background of the element it's necessary to have two backgrounds (image, gradient, color)
background: first-background properties, second-background properties; */
background: url(imageA.png) no-repeat center, url(imageB.png) no-repeat center;
border-radius: 10px;
box-shadow: 5px 2px 10px #888;
display: inline-block;
height:200px;
margin: 1em;
opacity: 0.5;
transition: opacity .25s ease-in-out;
width: 200px;
}
label {
display:block;
background: #fff;
font-family: Georgia, Garamond, serif;
text-align:center;
text-shadow: .5px .7px .7px #eee;
}
div:hover { opacity: 1.0; }
// background-blend-mode: blend-mode;
.normal { background-blend-mode: normal; }
.multiply { background-blend-mode: multiply; }
.screen { background-blend-mode: screen; }
.overlay { background-blend-mode: overlay; }
.darken { background-blend-mode: darken; }
.ligthen { background-blend-mode: ligthen; }
.color-dodge { background-blend-mode: color-dodge; }
.color-burn { background-blend-mode: color-burn; }
.hard-light { background-blend-mode: hard-light; }
.soft-light { background-blend-mode: soft-light; }
.difference { background-blend-mode: difference; }
.exclusion { background-blend-mode: exclusion; }
.hue { background-blend-mode: hue; }
.saturation { background-blend-mode: saturation; }
.color { background-blend-mode: color; }
.luminosity { background-blend-mode: luminosity; }
Usage
The ‘background-blend-mode’ list must be applied in the same order as ‘background-image’. This means that the first element in the list will apply to the layer that is on top. If a property doesn't have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough.
If the ‘background’ shorthand is used, the ‘background-blend-mode’ property for that element must be reset to its initial value.
NotesSeparable blend modes (normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion)
A blend mode is termed separable if each component of the result color is completely determined by the corresponding components of the constituent backdrop and source colors — that is, if the mixing formula is applied separately to each set of corresponding components.
Non-separable blend modes (hue, saturation, color, luminosity)
Non-separable blend modes consider all color components in combination as opposed to the seperable ones that look at each component individually.
Related specificationsbackground-blend-mode
background-blend-mode
background-blend-mode
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4