Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS mix-blend-mode property

CSS mix-blend-mode property

Example

Set the image element to blend with the parent container's background (yellow); the image becomes darker:

.container

{

background-color:

yellow

;

padding:

15

px

;

}

.container

img

{

mix-blend-mode:

darken

;

}

Try it »


Tag Definition and Usage Notes

The mix-blend-mode property describes how an element's content should blend with the content of the element's direct parent and the element's background.

Default value: normal
Inherited: none.
Animatable: none. About CSS Animations
JavaScript syntax: object.style.mixBlendMode = "darken" Try it »

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
mix-blend-mode 41.0 79.0 32.0 8.0 35.0

Syntax



mix-blend-mod:  

The value can be one of the following:



mix-blend-mode: normal;

mix-blend-mode: multiply;

mix-blend-mode: screen;

mix-blend-mode: overlay;

mix-blend-mode: darken;

mix-blend-mode: lighten;

mix-blend-mode: color-dodge

mix-blend-mode: color-burn;

mix-blend-mode: hard-light;

mix-blend-mode: soft-light;

mix-blend-mode: difference;

mix-blend-mode: exclusion;

mix-blend-mode: hue;

mix-blend-mode: saturation;

mix-blend-mode: color;

mix-blend-mode: luminosity;

Multiple values can be separated by commas.

Example

Examples of the various blend modes:

.normal

{

mix-blend-mode:

normal

;

}

.multiply

{

mix-blend-mode:

multiply

;

}

.screen

{

mix-blend-mode:

screen

;

}

.overlay

{

mix-blend-mode:

overlay

;

}

.darken

{

mix-blend-mode:

darken

;

}

.lighten

{

mix-blend-mode:

lighten

;

}

.color-dodge

{

mix-blend-mode:

color-dodge

;

}

.color-burn

{

mix-blend-mode:

color-burn

;

}

.difference

{

mix-blend-mode:

difference

;

}

.exclusion

{

mix-blend-mode:

exclusion

;

}

.hue

{

mix-blend-mode:

hue

;

}

.saturation

{

mix-blend-mode:

saturation

;

}

.color

{

mix-blend-mode:

color

;

}

.luminosity

{

mix-blend-mode:

luminosity

;

}

Try it »