【Loading动画样式】Vue Scss实现的两种Loading动画样式

2023-10-31

动画一

<template>
  <div class="loading-next">
    <div class="loading-next-box">
      <div class="loading-next-box-warp">
        <div
          class="loading-next-box-item"
          v-for="item in LoadingDate"
          :key="item"
        ></div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'wqWWQ',
  data () {
    return {
      LoadingDate: [1, 2, 3, 4, 5, 6, 7, 8, 9]
    }
  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.loading-next {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #f8f8f8;
  .loading-next-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .loading-next-box-warp {
    width: 80px;
    height: 80px;
    .loading-next-box-item {
      width: 33.333333%;
      height: 33.333333%;
      background: #5fb878;
      float: left;
      animation: loading-next-animation 1.2s infinite ease;
      border-radius: 1px;
    }
    @keyframes loading-next-animation {
      0%,
      70%,
      to {
        transform: scaleZ(1);
      }

      35% {
        transform: scale3D(0, 0, 1);
      }
    }
    .loading-next-box-item:nth-child(7) {
      animation-delay: 0s;
    }
    .loading-next-box-item:nth-child(4),
    .loading-next-box-item:nth-child(8) {
      animation-delay: 0.1s;
    }

    .loading-next-box-item:nth-child(1),
    .loading-next-box-item:nth-child(5),
    .loading-next-box-item:nth-child(9) {
      animation-delay: 0.2s;
    }
    .loading-next-box-item:nth-child(2),
    .loading-next-box-item:nth-child(6) {
      animation-delay: 0.3s;
    }
    .loading-next-box-item:nth-child(3) {
      animation-delay: 0.4s;
    }
  }
}
</style>

动画二

<template>
  <div class="load-animation">
    <div class="animation"></div>
  </div>
</template>

<script>
export default {
  name: 'ShiftProjectProject',

  data () {
    return {}
  },

  mounted () {},

  methods: {}
}
</script>

<style lang="scss" scoped>
.load-animation {
  position: fixed;
  bottom: 0px;
  right: 0px;
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  z-index: 9999999;
  display: block;
  float: left;
  .animation {
    width: 50px;
    height: 50px;
    margin: 30px auto 40px;
    margin-top: 20%;
    position: relative;
    z-index: 999999;
    background-color: whitesmoke;
    &::before {
      content: '';
      width: 50px;
      height: 7px;
      border-radius: 50%;
      background: #000;
      opacity: 0.1;
      position: absolute;
      top: 59px;
      left: 0;
      animation: shadow 0.5s linear infinite;
    }
    &::after {
      content: '';
      width: 50px;
      height: 50px;
      border-radius: 3px;
      background-color: #5fb878;
      position: absolute;
      top: 0;
      left: 0;
      animation: loading 0.5s linear infinite;
    }
    @-webkit-keyframes loading {
      17% {
        border-bottom-right-radius: 3px;
      }
      25% {
        transform: translateY(9px) rotate(22.5deg);
      }
      50% {
        transform: translateY(18px) scale(1, 0.9) rotate(45deg);
        border-bottom-right-radius: 40px;
      }
      75% {
        transform: translateY(9px) rotate(67.5deg);
      }
      100% {
        transform: translateY(0) rotate(90deg);
      }
    }
    @keyframes loading {
      17% {
        border-bottom-right-radius: 3px;
      }
      25% {
        transform: translateY(9px) rotate(22.5deg);
      }
      50% {
        transform: translateY(18px) scale(1, 0.9) rotate(45deg);
        border-bottom-right-radius: 40px;
      }
      75% {
        transform: translateY(9px) rotate(67.5deg);
      }
      100% {
        transform: translateY(0) rotate(90deg);
      }
    }
    @-webkit-keyframes shadow {
      0%,
      100% {
        transform: scale(1, 1);
      }
      50% {
        transform: scale(1.2, 1);
      }
    }
    @keyframes shadow {
      0%,
      100% {
        transform: scale(1, 1);
      }
      50% {
        transform: scale(1.2, 1);
      }
    }
  }
}
</style>


 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【Loading动画样式】Vue Scss实现的两种Loading动画样式 的相关文章

随机推荐

  • 记录开发中遇到sonar以及相关思路解决

    sonar问题汇总 1 布尔常量使用 问题标题 How to fix the major issue in SonarQube needlessly boxes a boolean constant 如何解决 SonarQube 中的主要问
  • 【前端】CSS水平居中的6种方法

    文章目录 flex 绝对定位 margin auto 绝对定位 margin 负值 定位 transform text align center margin 0 auto 思维导图 后文 前端 CSS垂直居中的7种方法 karshey的博
  • about wParam and lParam

    这两个是Win16系统遗留下来的产物了在Win16API中WndProc有两个参数一个是WORD类型的16位整型变量另一个是LONG类型的32位整型变量 因此根据匈牙利命名法 16位的变量就被命名为wParam 而32位的变量就被命名为lP
  • zotero使用教程学习

    从b站找的视频中学习zotero 视频见 商小图学堂 文献管理神器之Zotero 1收集题录 1 1用浏览器插件 如何安装插件自行百度 因为我忘记了 而且在Google上我不会安装 有空仔细学一下 1 2通过标识符添加 1 3下载文献后拖拽
  • 520最浪漫表白:QQ打开基于Python实现的无法拒绝的音乐表白代码!别让等待,成了遗憾!

    520表白日 男人怎么送礼物 就怎么爱你 每个女孩都喜欢男孩对自己浪漫的表白 不过每个人性格不同 浪漫表白的方式也不尽相同 那么520怎样浪漫的表白好呢 程序员如何俘获心仪女神的心呢 当然是要用程序员的方法了 在2020年5月20日到来之际
  • dota数据集转换为YOLO格式的方法

    下载好dota数据集 运行下面代码 dota utils py import sys import codecs import numpy as np import shapely geometry as shgeo import os i
  • Android studio利用xutils进行文件下载

    对于Android开发过程中便捷的xutils框架 为我们的Android开发提供了很多较为便利的操作 简化代码 功能强大 本文主要对xutlis中的HttpUtils进行简单的使用介绍 本人使用的工具为Android studio3 1
  • Spark 入门

    Spark入门教程 大数据 Spark Spark入门教程 1 https blog csdn net ningjiebing article details 89410983 大数据 Spark Spark入门教程 2 https blo
  • C语言/C++ 之 打飞机游戏

    项目简介 1 设计思想 本项目主要是为了实现打飞机游戏 主要包括5个函数模块 和1个主函数框架 分别是chu shi hua you cao zuo wu cao zuo show main 等 项目完成过程中主要运用了C C 中的输入输出
  • 保姆级详细介绍Navicat安装会出现的四种问题,详细给出解决办法

    详细介绍安装Navicat激活过程中会出现的问题 文章目录 详细介绍安装Navicat激活过程中会出现的问题 前言 一 安装Navicat 二 注册出现 rsa public key not find 2 1注册表内删掉 2 2删掉安装残留
  • vcpkg: bootstrap-vcpkg.bat下载失败问题

    目录 问题描述 解决方案 大概更好的解决方案 问题描述 将vcpkg项目下载到本地以后运行bootstrap vcpkg bat以后显示下载失败 PS D ProgramData vcpkg gt bootstrap vcpkg bat D
  • Centos7 开启远程root登陆以及Vscode远程ssh连接root用户

    开启远程root登陆 目录 开启远程root登陆 1 检查ssh是否安装 2 进入ssh配置文件sshd config 3 查看ssh 服务状态 4 启动ssh服务 Vscode远程ssh连接配置 python 1 确认Vscode已经安装
  • Nodejs Error: read ECONNRESET

    错误原因 与客户端的Socket被客户端强行被断开 而服务器还企图read const net require net var tcp net createServer socket gt console log someone conne
  • jdk命令使用场景

    1 CPU 100 分析 1 1 top查看进程pid 3709进程占用cpu最高 1 2 使用jdk命令jstack获取此时的线程快照 当前目录生成快照 gt jstack l 3709 gt jstack result txt 1 3
  • 栅格法分割地面点云

    文章目录 前言 一 栅格法的主要方法 二 处理步骤 1 函数入口 2 groundRemove函数 伪代码及使用效果 前言 由于道路的非平面性质 来自3D激光扫描仪的点云还包括被车辆视为非障碍物 即可导航 的地形信息 从可能构成障碍物的高点
  • 区块链应用_法务存证,电子存证

    电子存证1 0 传统的第三方电子存证平台 国内首例电子合同案件获裁决认可 国内首创电子合同平台 引入第三方保险 发生网贷纠纷 电子合同可以作为法庭证据吗 法官说 周丽婷 电子存证在著作权侵权诉讼中的审查认定 凭什么认可电子存证法律效力 这个
  • Bottle UiKit Python实现的前后端交互代码实现

    文章目录 项目所在 GitHub 地址 1 项目整体思路 2 项目实现技术 3 前端界面实现 4 后端服务器框架 bottle 简单介绍 5 python 代码实现 5 1 main py 5 2 Callibration py 6 前后端
  • 单表多表数据查询(笛卡尔积、内连接、外连接)各种函数

    目录 数学函数 时间函数 三元运算符 聚合函数 通配符与like配合使用
  • js 浮点数与整数比大小

    JS在比较数字的时候一定不要直接比较 而是要转换 因为JS里面的是var 这种是弱的类型 默认是string 所有比较的时候会出现错误 JS里面有两种转换的 parseFloat和parseInt 比较的时候想下面这样 整数如下 if pa
  • 【Loading动画样式】Vue Scss实现的两种Loading动画样式

    动画一