当前位置: 首页 > ds >正文

【组件】跳动的图标 动画

目录

  • 效果
  • 组件代码
  • 素材

效果

在这里插入图片描述

组件代码

<!-- 图标跳动 -->
<template><div class="icon_bounce_com" :style="{ '--size': iconBouceSize }"><div class="bounce-icon"><img :src="iconObj[iconName]" alt="" /></div><div class="waves"><div class="wave"><img src="@/assets/images/screen-zhidu/bounce-jump.png" alt="" /></div><div class="wave"><img src="@/assets/images/screen-zhidu/bounce-jump.png" alt="" /></div></div><div class="bounce-bottom"></div></div>
</template><script>
import car from '@/assets/images/screen-zhidu/bounce-icon-car.png'
import car1 from '@/assets/images/screen-zhidu/bounce-icon-car1.png'
import car2 from '@/assets/images/screen-zhidu/bounce-icon-car2.png'
import warning from '@/assets/images/screen-zhidu/bounce-icon-warning.png'export default {name: 'IconBounceCom',props: {iconBouceSize: {type: String,default: '100px'},iconName: {type: String,retquired: true}},data() {return {iconObj: {jysg: car,sgzl: car1,ybsg: car2,yj: warning}}}
}
</script><style lang='scss' scoped>
.icon_bounce_com {$size: var(--size);position: relative;width: $size;height: $size;background: url('~@/assets/images/screen-zhidu/bounce-jump.png') bottom no-repeat;background-size: contain;&::before {content: '';position: absolute;bottom: 0;left: 0;width: 100%;height: 100%;background-image: url('~@/assets/images/screen-zhidu/bounce-bg.png');background-position-y: bottom;animation: bg 3s infinite;}@keyframes bg {0%,100% {opacity: 0.2;}50% {opacity: 1;}}.bounce-icon {width: 75%;display: inline-block;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);animation: bounce 3s infinite;img {width: 100%;}@keyframes bounce {0%,100% {top: 50%;}50% {top: 30%;}}}.waves {.wave {img {width: 100%;height: 100%;}position: absolute;bottom: 0;animation: wave 4s linear infinite;&:nth-child(2) {animation-delay: 2s;}@keyframes wave {0% {bottom: 0;}100% {bottom: 100%;opacity: 0;}}}}.bounce-bottom {position: absolute;bottom: -10px;left: 0;width: calc(#{$size} * 0.7071);height: calc(#{$size} * 0.7071);border: 3px solid #72c3f9;transform: rotateX(53deg) rotateZ(45deg) translateX(calc(#{$size} / 5));perspective: 1000px;filter: blur(5px);}
}
</style>

素材

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

http://www.xdnf.cn/news/9597.html

相关文章:

  • 实验设计与分析(第6版,Montgomery)第4章随机化区组,拉丁方, 及有关设计4.5节思考题4.1~4.4 R语言解题
  • GRIT:让AI“指着图说话“的新思路
  • get_rga_thread线程和low_camera_venc_thread线程获取低分辨率VENC码流数据
  • ORB-SLAM2学习笔记:ComputeKeyPointsOctTree分析过程记录
  • 【C语言】详解 指针
  • 使用 PySpark 从 Kafka 读取数据流并处理为表
  • 【25软考网工】第九章 网络管理(1)网络管理基础、SNMP
  • 端到端测试最佳实践:从入门到精通的完整指南
  • vue+ts+TinyEditor 是基于 Quill 2.0 开发的富文本编辑器,提供丰富的扩展功能,适用于现代 Web 开发的完整安装使用教程
  • 集成电路制造设备防震基座选型指南:为稳定护航-江苏泊苏系统集成有限公司
  • 手机如何压缩文件为 RAR 格式:详细教程与工具推荐
  • 井喷式增长下的证件缺口:特种设备人才供需矛盾如何破局?
  • 数值积分实验
  • 深入理解计算机科学中的“递归”:原理、应用与优化
  • vue3+Pinia+element-plus 后台管理系统项目实战
  • 安全,稳定可靠的政企即时通讯数字化平台
  • 金山云Q1营收19.7亿元 AI持续释放业务增长新动能
  • 【第2章 绘制】2.13 坐标变换
  • 数据拟合实验
  • IO 中的阻塞、非阻塞、同步、异步及五种IO模型
  • 服务器定时任务查看和编辑
  • SpringBoot Controller接收参数方式
  • Senna代码解读
  • SQLite软件架构与实现源代码浅析
  • 跨平台开发框架electron
  • 【Linux学习笔记】深入理解动静态库本质及其制作
  • 嵌入式学习笔记 - 用typedef定义函数指针
  • 网络安全十大漏洞
  • 22.代理模式:思考与解读
  • MongoDB选择理由