CSS新属性--mix-blend-mode

基础知识

mix-blend-mode 属性描述了元素的内容应该与元素的直系父元素的内容和元素的背景如何混合。

可选值有:
normal 正常
multiply 正片叠底
screen 滤色
overlay 叠加
darken 变暗
lighten 变亮
color-dodge 颜色减淡
color-burn 颜色加深
hard-light 强光
soft-light 柔光
difference
exclusion
hue 色相
saturation 饱和度
color
luminosity

12接下来给大家举些例子方便大家了解!!
有的有点阴间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;
        }

12
23

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值