基础知识
mix-blend-mode 属性描述了元素的内容应该与元素的直系父元素的内容和元素的背景如何混合。
可选值有:
normal 正常
multiply 正片叠底
screen 滤色
overlay 叠加
darken 变暗
lighten 变亮
color-dodge 颜色减淡
color-burn 颜色加深
hard-light 强光
soft-light 柔光
difference
exclusion
hue 色相
saturation 饱和度
color
luminosity
接下来给大家举些例子方便大家了解!!
有的有点阴间hhhh
<div class="box">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
<img src="../1.jpg">
</div>
*{
margin: 0;
padding: 0;
}
.box{
display: flex;
flex-wrap: wrap;
width: 100%;
height: 700px;
background-color: yellow;
}
img{
width: 200px;
height: 200px;
object-fit: cover;
}
img:nth-child(1){
mix-blend-mode:normal;
}
img:nth-child(2){
mix-blend-mode:multiply;
}
img:nth-child(3){
mix-blend-mode:screen;
}
img:nth-child(4){
mix-blend-mode:overlay;
}
img:nth-child(5){
mix-blend-mode:darken;
}
img:nth-child(6){
mix-blend-mode:lighten;
}
img:nth-child(7){
mix-blend-mode:color-dodge;
}
img:nth-child(8){
mix-blend-mode:color-burn;
}
img:nth-child(9){
mix-blend-mode:hard-light;
}
img:nth-child(10){
mix-blend-mode:soft-light;
}
img:nth-child(11){
mix-blend-mode:difference;
}
img:nth-child(12){
mix-blend-mode:exclusion;
}
img:nth-child(13){
mix-blend-mode:hue;
}
img:nth-child(14){
mix-blend-mode:saturation;
}