Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the background-blend-mode attribute in CSS

Shulou Source: shulou.com Published: 2022-06-01 12:14:38 10月03日 Update

This article is about how to use the background-blend-mode attribute in CSS. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

CSSbackground-blend-mode attribute

Function: used to define the blending mode of the background layer (picture and color)

Syntax:

Background-blend-mode:normal | multiply | screen | overlay | darken | lighten | color-dodge | saturation | color | luminosity

Attribute value:

Normal: default value, which sets the normal blending mode.

Multiply: positive overlay mode.

Screen: color filter mode.

Overlay: overlay mode.

Darken: dims the mode.

Lighten: brightens the mode.

Color-dodge: color dodge mode.

Saturation: saturation mode.

Color: color mode.

Luminosity: luminance mode.

Note: the background-blend-mode attribute is not supported by InternetExplorer.

An example of using the CSSbackground-blend-mode attribute

Body {background-color:yellow;}

Div {

Width:290px

Height:69px

Background-size:290px69px

Background-repeat:no-repeat

Background-image:linear-gradient (toright,#25a1b150%,#862e3e100%), url ('https://img.php.cn/upload/article/000/000/024/5c6a4428ea867709.png');

Background-blend-mode:color-dodge

}

Thank you for reading! This is the end of this article on "how to use background-blend-mode attributes in CSS". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Mode attribute color content more article mixed good practical brightness function picture article positive look knowledge example background grammar saturation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple vpn MariaDB MySQL Microsoft