CSS background-blend-mode属性怎么用?

CSS background-blend-mode属性用于定义背景层的混合模式,其语法是“background-blend-mode: normal|multiply|screen|overlay|darken|lighten…”。

CSS background-blend-mode属性怎么用?

推荐:《css教程》

background-blend-mode属性用于定义背景层的混合模式(图片与颜色),可设置的模式有:正片叠底模式、滤色模式、叠加模式、变暗模式、变亮模式、颜色减淡模式、饱和度模式、颜色模式、亮度模式。

CSS background-blend-mode属性

作用:用于定义了背景层的混合模式(图片与颜色)

立即学习“前端免费学习笔记(深入)”;

语法:

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

属性值:

normal:默认值,设置正常的混合模式。

multiply:正片叠底模式。

screen:滤色模式。

overlay:叠加模式。

darken:变暗模式。

lighten:变亮模式。

color-dodge:颜色减淡模式。

saturation:饱和度模式。

color:颜色模式。

luminosity:亮度模式。

注: Internet Explorer 不支持 background-blend-mode 属性。

CSS background-blend-mode属性的使用示例

 body  {background-color: yellow;}div {   width: 290px;  height: 69px;  background-size: 290px 69px;  background-repeat:no-repeat;  background-image: linear-gradient(to right, #25a1b1 50%,#862e3e 100%), url('https://img.php.cn/upload/article/000/000/024/5c6a4428ea867709.png');  background-blend-mode: color-dodge;}

效果图:

2.jpg

以上就是本篇文章的全部内容,希望能对大家的学习有所帮助。

以上就是CSS background-blend-mode属性怎么用?的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1614267.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
css3 icon属性怎么用?
上一篇 2025年12月24日 04:09:40
CSS如何使用!important规则?(代码示例)
下一篇 2025年12月24日 04:09:49

相关推荐

发表回复

登录后才能评论
关注微信