css 实现图片专场
2024-10-20 00:05:59
<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
最新文章
- .NET Core系列 :3 、使用多个项目
- 基于Dubbo框架构建分布式服务(二)
- FormsAuthentication详解
- Linux C 程序 预处理,结构体(13)
- Android UI设计系统---LayoutParams[转]
- 软件测试之WEB测试经典总结
- Dede 列表页 缩略图 有显示无则不显示
- 删除kafka的topic及kafka基本命令
- Java读取文件存储到mysql
- Ubuntu18.10下配置PHP7.2 + Apache2 + Mysql5.7
- TensorRT&;Sample&;Python[uff_custom_plugin]
- C++实现文件内字符数、单词数、行数的统计
- Redis主从+KeepAlived实现高可用
- xml可视化编辑器
- Windows 7 X64 SQL Server 2000 企业管理器无法建立新表
- luogu 1966 火柴排队 离散化+逆序对
- 连接SSH服务器的脚本,自动发送用户名和密码
- Linux查看某个进程的磁盘IO读写情况 pidstat
- yum update 自动忽略内核更新
- c++ 双向链表 的查找和删除
热门文章
- Python函数-5 生成器
- 二叉树:前序遍历、中序遍历、后序遍历,BFS,DFS
- T12焊台控制器制作教程 | T12烙铁 | PID增量式算法恒温控制 | 运算放大器-热电偶电压采集 | OLED屏幕显示-SPI通信 | 旋转编码器EC11用户操作
- luoguP6622 [省选联考 2020 A/B 卷] 信号传递(状压dp)
- bzoj3926/luoguP3346 [Zjoi2015]诸神眷顾的幻想乡(trie上构建广义后缀自动机)
- 数据结构 - 顺序表 C++ 实现
- JSP和Servlet有哪些相同点和不同点?
- TreeMap与TreeSet的源码分析
- Kafka 新旧消费者的区别?
- C++面试问题汇总