<template>
<div>
</div>
</template>
<style lang="scss">
html, body {
    width: 100%;
    height: 100%;
    display: flex;
}
div {
    margin: auto;
    position: relative;
    width: 30vw;
    height: 70vh;
    background: url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2128480768,3645204276&fm=26&gp=0.jpg) no-repeat;
    background-size: cover;
   
    &::before {
        position: absolute;
        content: "";
        top: 0;left: 0; right: 0;bottom: 0;
        background: url(https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1877625006,2341162086&fm=26&gp=0.jpg) no-repeat;
        background-size: cover;
        z-index: 1;
        animation: maskRotate 4s ease-in-out infinite;
    }
}
@keyframes maskRotate {
    @for $i from 0 through 50 {
        #{$i}% {
            mask: linear-gradient(45deg, #000 #{$i * 2 + '%'}, transparent #{$i * 2.5 + '%'}, transparent #{$i * 2.5 + '%'});
        }
    }
    100% {
        mask: linear-gradient(45deg, #000, #000 100%);
    }
}
</style>

转自:https://csscoco.com/inspiration/#/./background/bg-mask-transition.md

最新文章

  1. .NET Core系列 :3 、使用多个项目
  2. 基于Dubbo框架构建分布式服务(二)
  3. FormsAuthentication详解
  4. Linux C 程序 预处理,结构体(13)
  5. Android UI设计系统---LayoutParams[转]
  6. 软件测试之WEB测试经典总结
  7. Dede 列表页 缩略图 有显示无则不显示
  8. 删除kafka的topic及kafka基本命令
  9. Java读取文件存储到mysql
  10. Ubuntu18.10下配置PHP7.2 + Apache2 + Mysql5.7
  11. TensorRT&amp;Sample&amp;Python[uff_custom_plugin]
  12. C++实现文件内字符数、单词数、行数的统计
  13. Redis主从+KeepAlived实现高可用
  14. xml可视化编辑器
  15. Windows 7 X64 SQL Server 2000 企业管理器无法建立新表
  16. luogu 1966 火柴排队 离散化+逆序对
  17. 连接SSH服务器的脚本,自动发送用户名和密码
  18. Linux查看某个进程的磁盘IO读写情况 pidstat
  19. yum update 自动忽略内核更新
  20. c++ 双向链表 的查找和删除

热门文章

  1. Python函数-5 生成器
  2. 二叉树:前序遍历、中序遍历、后序遍历,BFS,DFS
  3. T12焊台控制器制作教程 | T12烙铁 | PID增量式算法恒温控制 | 运算放大器-热电偶电压采集 | OLED屏幕显示-SPI通信 | 旋转编码器EC11用户操作
  4. luoguP6622 [省选联考 2020 A/B 卷] 信号传递(状压dp)
  5. bzoj3926/luoguP3346 [Zjoi2015]诸神眷顾的幻想乡(trie上构建广义后缀自动机)
  6. 数据结构 - 顺序表 C++ 实现
  7. JSP和Servlet有哪些相同点和不同点?
  8. TreeMap与TreeSet的源码分析
  9. Kafka 新旧消费者的区别?
  10. C++面试问题汇总