【CSS】纯CSS Loading动画组件

news2024/10/19 6:06:56

在这里插入图片描述

<template>
    <div class="ai-loader-box">
        <!-- AI loader -->
        <div class="ai-loader">
        <div class="text">
          <p>AI智能分析中....</p>
        </div>
      <div class="horizontal"><div class="circlesup"><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div></div><div class="circlesdwn"><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div></div></div><div class="vertical"><div class="circlesup"><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div></div><div class="circlesdwn"><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div></div></div></div>
    </div>
</template>

<style scoped>
.ai-loader-box{
    position: relative;
    width: 600px;
    height: 600px;
    margin: 20px auto;
}
/* Start the loader code, first, let's align it the center of screen */
.ai-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -mos-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    text-align: center;
    /* disable selection and cursor changes */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

/* Text align it the center of screen and connect the looped animation for 2 seconds */
.text {
  position: absolute;
    left: -110px;
    top: -1.7em;
    /* -webkit-animation: text 2s infinite;
    -moz-animation: text 2s infinite;
    -moz-animation: text 2s infinite;
    -ms-animation: text 2s infinite;
    -o-animation: text 2s infinite;
    animation: text 2s infinite; */
    width: 280px;
    z-index: 10;
    color: #f00;
    background: #fff1f1db;
    border-radius: 4px;
    font-size: 40px;
}

/* Set for the first layer vertical position */
.vertical {
    position: absolute;
    top: -1.84em;
    left: -0.4em;
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
}

/* Set for the second layer horizontal position */
.horizontal {
    position: absolute;
    top: 0em;
    left: 0em;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
}

/* The next two classes do mirror for animation */
.circlesup {
    position: absolute;
    top: -4.7em;
    right: 12.1em;
}

.circlesdwn {
    position: absolute;
    top: 2.5em;
    right: -13.5em;
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transform: rotate(180deg);
}

/* Create a container for our circles, rotate it 45 degrees and set animation*/
.circle {
    position: absolute;
    width: 15em;
    height: 15em;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    -o-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-animation: orbit 2s infinite;
    -moz-animation: orbit 2s infinite;
    -moz-animation: orbit 2s infinite;
    -ms-animation: orbit 2s infinite;
    -o-animation: orbit 2s infinite;
    animation: orbit 2s infinite;
    z-index: 5;
}

/* Style's of our circles */
.circle:after {
    content: '';
    position: absolute;
    width: 2em;
    height: 2em;
    -webkit-border-radius: 100%;
    -moz-border-radius: 100%;
    -ms-border-radius: 100%;
    -o-border-radius: 100%;
    border-radius: 100%;
    background: rgb(255, 20, 20);
    /* Pick a color 1*/
}

.circle:nth-child(2) {
    -webkit-animation-delay: 100ms;
    -moz-animation-delay: 100ms;
    -ms-animation-delay: 100ms;
    -o-animation-delay: 100ms;
    animation-delay: 100ms;
    z-index: 4;
}

.circle:nth-child(2):after {
    background: var(--el-color-primary);
    /* Pick a color 2*/
    -webkit-transform: scale(0.8,0.8);
    -moz-transform: scale(0.8,0.8);
    -ms-transform: scale(0.8,0.8);
    -o-transform: scale(0.8,0.8);
    transform: scale(0.8,0.8);
}

.circle:nth-child(3) {
    -webkit-animation-delay: 225ms;
    -moz-animation-delay: 225ms;
    -ms-animation-delay: 225ms;
    -o-animation-delay: 225ms;
    animation-delay: 225ms;
    z-index: 3;
}

.circle:nth-child(3):after {
    background: var(--el-color-primary-light-3);
    /* Pick a color 3*/
    -webkit-transform: scale(0.6,0.6);
    -moz-transform: scale(0.6,0.6);
    -ms-transform: scale(0.6,0.6);
    -o-transform: scale(0.6,0.6);
    transform: scale(0.6,0.6);
}

.circle:nth-child(4) {
    -webkit-animation-delay: 350ms;
    -moz-animation-delay: 350ms;
    -ms-animation-delay: 350ms;
    -o-animation-delay: 350ms;
    animation-delay: 350ms;
    z-index: 2;
}

.circle:nth-child(4):after {
    background: var(--el-color-primary-light-5);
    /* Pick a color 4*/
    -webkit-transform: scale(0.4,0.4);
    -moz-transform: scale(0.4,0.4);
    -ms-transform: scale(0.4,0.4);
    -o-transform: scale(0.4,0.4);
    transform: scale(0.4,0.4);
}

.circle:nth-child(5) {
    -webkit-animation-delay: 475ms;
    -moz-animation-delay: 475ms;
    -ms-animation-delay: 475ms;
    -o-animation-delay: 475ms;
    animation-delay: 475ms;
    z-index: 1;
}

.circle:nth-child(5):after {
    background: var(--el-color-primary);
    /* Pick a color 5*/
    -webkit-transform: scale(0.2,0.2);
    -moz-transform: scale(0.2,0.2);
    -ms-transform: scale(0.2,0.2);
    -o-transform: scale(0.2,0.2);
    transform: scale(0.2,0.2);
}

/* Animation keys */
@-webkit-keyframes orbit {
    0% {
        -webkit-transform: rotate(45deg);
    }

    5% {
        -webkit-transform: rotate(45deg);
        -webkit-animation-timing-function: ease-out;
    }

    70% {
        -webkit-transform: rotate(405deg);
        -webkit-animation-timing-function: ease-in;
    }

    100% {
        -webkit-transform: rotate(405deg);
    }
}

@-moz-keyframes orbit {
    0% {
        -moz-transform: rotate(45deg);
    }

    5% {
        -moz-transform: rotate(45deg);
        -moz-animation-timing-function: ease-out;
    }

    70% {
        -moz-transform: rotate(405deg);
        -moz-animation-timing-function: ease-in;
    }

    100% {
        -moz-transform: rotate(405deg);
    }
}

@-ms-keyframes orbit {
    0% {
        -ms-transform: rotate(45deg);
    }

    5% {
        -ms-transform: rotate(45deg);
        -ms-animation-timing-function: ease-out;
    }

    70% {
        -ms-transform: rotate(405deg);
        -ms-animation-timing-function: ease-in;
    }

    100% {
        -ms-transform: rotate(405deg);
    }
}

@-o-keyframes orbit {
    0% {
        -o-transform: rotate(45deg);
    }

    5% {
        -o-transform: rotate(45deg);
        -o-animation-timing-function: ease-out;
    }

    70% {
        -o-transform: rotate(405deg);
        -o-animation-timing-function: ease-in;
    }

    100% {
        -o-transform: rotate(405deg);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(45deg);
    }

    5% {
        transform: rotate(45deg);
        animation-timing-function: ease-out;
    }

    70% {
        transform: rotate(405deg);
        animation-timing-function: ease-in;
    }

    100% {
        transform: rotate(405deg);
    }
}

@-webkit-keyframes text {
    0% {
        -webkit-transform: scale(0.2,0.2);
        -webkit-animation-timing-function: ease-out;
    }

    40%,60% {
        -webkit-transform: scale(1,1);
        -webkit-animation-timing-function: ease-out;
    }

    70%,100% {
        -webkit-transform: scale(0.2,0.2);
    }
}

@-moz-keyframes text {
    0% {
        -moz-transform: scale(0.2,0.2);
        -moz-animation-timing-function: ease-out;
    }

    50% {
        -moz-transform: scale(1,1);
        -moz-animation-timing-function: ease-out;
    }

    60% {
        -moz-transform: scale(1,1);
        -moz-animation-timing-function: ease-out;
    }

    100% {
        -moz-transform: scale(0.2,0.2);
    }
}

@-mos-keyframes text {
    0% {
        -mos-transform: scale(0.2,0.2);
        -mos-animation-timing-function: ease-out;
    }

    50% {
        -mos-transform: scale(1,1);
        -mos-animation-timing-function: ease-out;
    }

    60% {
        -mos-transform: scale(1,1);
        -mos-animation-timing-function: ease-out;
    }

    100% {
        -mos-transform: scale(0.2,0.2);
    }
}

@-o-keyframes text {
    0% {
        -o-transform: scale(1,1);
        -o-animation-timing-function: ease-out;
    }

    50% {
        -o-transform: scale(2,2);
        -o-animation-timing-function: ease-out;
    }

    100% {
        -o-transform: scale(1,1);
        -o-animation-timing-function: ease-out;
    }
}

@keyframes text {
    0% {
        transform: scale(1,1);
        animation-timing-function: ease-out;
    }

    50% {
        transform: scale(2,2);
        animation-timing-function: ease-out;
    }

    100% {
      transform: scale(1,1);
        animation-timing-function: ease-out;
    }
}
</style>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2218278.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

简单说说 spring是如何实现AOP的(源码分析)

在spring生命周期流程中&#xff0c;有一个过程是执行BeanPostProcessor的后置方法 BeanPostProcessor 是一个接口&#xff0c;其实现有 aop实现的核心类是AbstractAutoProxyCreator&#xff0c;其位于spring-aop包下&#xff0c;实现了BeanPostProcessor //BeanPostProcesso…

【Java小白图文教程】-04-分支结构

本套课程将会从0基础讲解Java语言核心技术&#xff0c;适合人群&#xff1a; 大学中开设了Java语言课程的同学想要专升本或者考研的同学想要考计算机等级证书的同学想要从事Java相关开发开发的同学 精品专题&#xff1a; 01.《C语言从不挂科到高绩点》课程详细笔记 https:/…

transformers 推理 Qwen2.5 等大模型技术细节详解(一)transformers 初始化和对象加载(文末免费送书)

上周收到一位网友的私信&#xff0c;希望老牛同学写一篇有关使用 transformers 框架推理大模型的技术细节的文章。 老牛同学刚开始以为这类的文章网上应该会有很多&#xff0c;于是想着百度几篇质量稍高一点的回复这位网友。结果&#xff0c;老牛同学搜索后发现&#xff0c;类…

力扣61~65题

题61&#xff08;中等&#xff09;&#xff1a; 分析&#xff1a; python代码&#xff1a; # Definition for singly-linked list. # class ListNode: # def __init__(self, val0, nextNone): # self.val val # self.next next class Solution:def rot…

【含开题报告+文档+PPT+源码】基于SpringBoot电脑DIY装机教程网站的设计与实现

开题报告 随着科技的发展和人们对电脑需求的增加&#xff0c;越来越多的人开始自己组装电脑。然而&#xff0c;针对初学者来说&#xff0c;如何选择合适的硬件配置并进行装机是一个相对复杂的过程。随着各种品牌、型号和规格的硬件不断增多&#xff0c;用户需要一个方便快捷的…

Java项目编译不通过,IDEA无法运行或调试Unit test类

mvn test可以通过&#xff0c;但是通过IDEA无法运行或调试&#xff0c;总是弹出一些依赖错误比如&#xff1a; 程序包xxx.xxx.xxx 不存在或找不到符号 解决办法 步骤1&#xff1a;IDEA 打开 File -> Setting ->Compiler &#xff0c;找到“Automatically show first …

20 Shell Script输入与输出

标出输入、标准输出、错误输出 一、程序的基本三个IO流 一&#xff09;文件描述符 ​ 任何程序在Linux系统中都有3个基本的文件描述符 ​ 比如: ​ cd/proc/$$/fd ​ 进入当前shell程序对于内核在文件系统的映射目录中: [rootlocalhost ~]# cd /proc/$$/fd [rootlocalhos…

基于System.js的微前端实现(插件化)

目录​​​​​​​ 写在前面 一、微前端相关知识 &#xff08;一&#xff09;概念 &#xff08;二&#xff09; 优势 &#xff08;三&#xff09; 缺点 &#xff08;四&#xff09;应用场景 &#xff08;五&#xff09;现有框架 1. qiankun 2. single-spa 3. SystemJ…

【MR开发】在Pico设备上接入MRTK3(一)——在Unity工程中导入MRTK3依赖

写在前面的话 在Pico上接入MRTK3&#xff0c;目前已有大佬开源。 https://github.com/Phantomxm2021/PicoMRTK3 也有值得推荐的文章。 MRTK3在PICO4上的使用小结 但由于在MacOS上使用MRTK3&#xff0c;无法通过Mixed Reality Feature Tool工具管理MRTK3安装包。 故记录一下…

Dockerr安装Oracle以及使用DBeaver连接

拉取镜像 pull container-registry.oracle.com/database/free:latest 创建容器 说明一下我现在的最新版本是23 docker run -d --name oracle23i -h xrilang -p 1521:1521 container-registry.oracle.com/database/free:latest 查看日志 docker logs oracle23i 设置密码 因为创建…

登录时用户名密码加密传输(包含前后端代码)

页面输入用户名密码登录过程中&#xff0c;如果没有对用户名密码进行加密处理&#xff0c;可能会导致传输过程中数据被窃取&#xff0c;就算使用https协议&#xff0c;在浏览器控制台的Request Payload中也是能直接看到传输的明文&#xff0c;安全感是否还是不足。 大致流程&a…

第二百八十八节 JPA教程 - JPA查询连接OrderBy示例

JPA教程 - JPA查询连接OrderBy示例 以下代码显示如何使用ORDER BY子句和连接条件。 List l em.createQuery("SELECT e " "FROM Project p JOIN p.employees e " "WHERE p.name :project " "ORDER BY e.name").setParameter("pr…

【MogDB】MogDB5.2.0重磅发布第四篇-支持windows版gsql,兼容sqlplus/sqlldr语法

一、背景 目前仍然很多客户的运维机使用windows操作系统&#xff0c;开发人员也是在windows环境上进行编码测试&#xff0c;甚至还有一些客户管理比较严格&#xff0c;禁止开发人员登录服务器进行操作。在MogDB 5.2.0版本之前&#xff0c;没有提供windows平台的gsql&#xff0…

在龙芯笔记本电脑上安装loongnix20

在龙芯笔记本电脑上安装loongnix20。该笔记本电脑原来安装了统信操作系统20。使用时发现屏幕调到最暗还是偏亮。使用起来不方便。于是安装另外一款操作系统loongnix20。 于是下载loongnix20。下载速度很快。下载以后安装也比较顺利。装好试了一下&#xff0c;屏幕亮度可以调到…

二叉树中的最长交错路径

题目链接 二叉树中的最长交错路径 题目描述 注意点 每棵树最多有 50000 个节点每个节点的值在 [1, 100] 之间起点无需是根节点 解答思路 要找到最长交错路径&#xff0c;首先想到的是深度优先遍历因为起点无需是根节点&#xff0c;所以对于任意一个节点&#xff0c;其可以…

分类任务中评估模型性能的核心指标

在机器学习尤其是分类任务中&#xff0c;Accuracy&#xff08;准确率&#xff09;、Precision&#xff08;精确率&#xff09;、Recall&#xff08;召回率&#xff09;和F1 Score&#xff08;F1分数&#xff09;是评估模型性能的四个核心指标。每个指标都有其独特的含义和用途&…

JVM进阶调优系列(4)年轻代和老年代采用什么GC算法回收?

大厂面试真题:GC 算法有多少种&#xff1f;各自优缺点是什么&#xff1f;年轻代和年老代选择哪种算法最优&#xff1f; 首先回顾一个图&#xff0c;也就是.class文件的类加载过程&#xff0c;以及线程执行、java内存模型图。看过系列1、2、3三篇文章的同学&#xff0c;大脑先回…

[产品管理-46]:产品组合管理中的项目平衡与管道平衡的区别

目录 一、项目平衡 1.1 概述 1.2 项目的类型 1、根据创新程度和开发方式分类 2、根据产品开发和市场周期分类 3、根据风险程度分类 4、根据市场特征分类 5、根据产品生命周期分类 1.3 产品类型的其他分类 1、按物理形态分类 2、按功能或用途分类 3、按技术或创新程…

大数据研究实训室建设方案

一、概述 本方案旨在提出一套全面的大数据研究实训室建设策略&#xff0c;旨在为学生打造一个集理论学习与实践操作于一体的高端教育环境。实训室将专注于培养学生在大数据处理、分析及应用领域的专业技能&#xff0c;通过先进的设施配置、科学的课程体系和实用的实训模式&…

C++之list(2)

list(2) list的迭代器 const迭代器 根据我们之前学过的知识&#xff1a; const int*p1;//修饰的是指向的内容 int *const p2;//修饰的是迭代器本身我们写const迭代器&#xff0c;期望的是指向的内容不能修改。 所以更期望写上面p1的形式 const迭代器与普通迭代器的不同点在于…