分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

[CSS 混合模式]——mix-blend-mode/background-blend-mode简介

发布时间:2023-09-06 01:30责任编辑:沈小雨关键词:CSS

mix-blend-mode/background-blend-mode

CSS3真是有很多的神奇的地方,这个两个元素你知道吗?

这是张大大拿过来的图,关于混合模式,借图一用。

mix-blend-mode

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; ?????//亮度mix-blend-mode: initial; ????????//初始mix-blend-mode: inherit; ????????//继承mix-blend-mode: unset; ??????????//复原

举个例子,自行去玩耍

CSS3 background-blend-mode

background-blend-mode这个要更好理解一点,背景的混合模式。可以是背景图片见的混合,也可以是背景图片和背景色的混合。

需要注意的是,只能是background属性中的背景图片和颜色混合,而且只能在一个background属性中。

CSS3 backgrounds多背景IE9+浏览器就开始支持了。因此,你想混合多图,就是要逗号,一个一个写在background属性中就可以了,

.box { ???background: url(mm1.jpg) no-repeat center, url(mm2.jpg) no-repeat center; 
   background-blend-mode: color;}

说明:

原文链接:http://www.zhangxinxu.com/wordpress/2015/05/css3-mix-blend-mode-background-blend-mode/

用这个两个属性可以做出很多效果出来。

[CSS 混合模式]——mix-blend-mode/background-blend-mode简介

原文地址:http://www.cnblogs.com/ifannie/p/8044192.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved