mix-blend-mode 混合模式 background-blend-mode 背景混合模式 isolation:isolate 隔离

时间:2022-04-23
本文章向大家介绍mix-blend-mode 混合模式 background-blend-mode 背景混合模式 isolation:isolate 隔离,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

css3 mix-blend-mode 混合模式 该属性不仅可以作用于HTML,还可以作用于SVG   兼容性: IE 8~11 Edge 12~14 Firefox 41~47 chrome 45~51 Safari 7~9.1   支持的值很多:   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:color;     //颜色   mix-blend-mode:luminosity; //亮度   mix-blend-mode:initial;   //初始   mix-blend-mode:inherit;   //继承   mix-blend-mode:unset;   //复原

css3 background-blend-mode 背景混合模式 可以是背景图片见的混合模式,也可以是背景图片和背景色的混合。   兼容性: IE 8~11 Edge 12~14 Firefox 41~47 chrome 45~51 Safari 7~9.1   CSS3 backgrounds多背景IE9+浏览器就开始支持了,因此,你想混合多图,就是要逗号,一个一个写在background属性中就可以了,   .box {     background: url(mm1.jpg) no-repeat center, url(mm2.jpg) no-repeat center;   }

css3 isolation:isolate 隔离   值除了万年不变的inherit外还包括auto和isolate   isolation:isolate 的原理:本质上是因为 isolation:isolate 创建一个新的层叠上下文。   只要有元素可以创建层叠上下文,就可以阻断mix-blend-mode     1.z-index值不为auto的position:relative/position:absolute定位元素。     2.position:fixed,仅限Chrome浏览器,其他浏览器遵循上一条,需要z-index为数值。     3.z-index值不为auto的flex项(父元素display:flex|inline-flex)。     4.元素的opacity值不是1。     5.元素的transform值不是none。     6.元素mix-blend-mode值不是normal。     7.元素的filter值不是none。     8.will-change指定的属性值为上面任意一个。     9.元素的-webkit-overflow-scrolling设为touch。