loading动画是前端页面加载时必不可少的元素,好看合适的加载动画会极大的提升用户体验与系统的交互效果。下面为大家提供几种简单的加载动画效果,如果帮助到你了请点赞评论。

1.无限循环的圆圈

<div class="chase-wrapper">
<div class="chase-item"></div>
<div class="chase-item"></div>
<div class="chase-item"></div>
<div class="chase-item"></div>
<div class="chase-item"></div>
<div class="chase-item"></div>
</div>
.chase-wrapper {
width: 60px;
height: 60px;
display: inline-block;
animation: chase-loader 2.5s infinite linear both;
margin: 50px;
}
.chase-item {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
animation: chase-dot 2s infinite ease-in-out both;
}
.chase-item:before {
content: "";
display: block;
width: 25%;
height: 25%;
background-color: skyBlue;
border-radius: 100%;
animation: chase-dot-before 2s infinite ease-in-out both;
} .chase-item:nth-child(1),
.chase-item:nth-child(1):before {
animation-delay: -1.1s;
}
.chase-item:nth-child(2),
.chase-item:nth-child(2):before {
animation-delay: -1s;
}
.chase-item:nth-child(3),
.chase-item:nth-child(3):before {
animation-delay: -0.9s;
}
.chase-item:nth-child(4),
.chase-item:nth-child(4):before {
animation-delay: -0.8s;
}
.chase-item:nth-child(5),
.chase-item:nth-child(5):before {
animation-delay: -0.7s;
}
.chase-item:nth-child(6),
.chase-item:nth-child(6):before {
animation-delay: -0.6s;
} @keyframes chase-loader {
100% {
transform: rotate(1turn);
}
} @keyframes chase-dot {
80%,
100% {
transform: rotate(360deg);
}
} @keyframes chase-dot-before {
50% {
transform: scale(0.4);
}
100%,
0% {
transform: scale(1);
}
}

2.若隐若现的方块

<div class="cube-wrapper">
<div class="cube cube1"></div>
<div class="cube cube2"></div>
<div class="cube cube3"></div>
<div class="cube cube4"></div>
<div class="cube cube5"></div>
<div class="cube cube6"></div>
<div class="cube cube7"></div>
<div class="cube cube8"></div>
<div class="cube cube9"></div>
</div>
.cube-wrapper {
width: 60px;
height: 60px;
display: inline-block;
margin: 50px;
}
.cube {
width: 33%;
height: 33%;
float: left;
background: skyBlue;
animation: cube-loader 1.3s infinite ease-in-out;
animation-delay: 0.2s;
}
.cube1 {
animation-delay: 0.2s;
}
.cube2 {
animation-delay: 0.3s;
}
.cube3 {
animation-delay: 0.4s;
}
.cube4 {
animation-delay: 0.1s;
}
.cube5 {
animation-delay: 0.2s;
}
.cube6 {
animation-delay: 0.3s;
}
.cube7 {
animation-delay: 0s;
}
.cube8 {
animation-delay: 0.1s;
} @keyframes cube-loader {
0%,
70%,
100% {
transform: scale3D(1, 1, 1);
}
35% {
transform: scale3D(0, 0, 1);
}
}

3.闪转腾挪的方块

<div class="plane-wrapper"></div>
.plane-wrapper {
width: 60px;
height: 60px;
background-color: skyBlue;
display: inline-block;
animation: plane-loader 1.2s infinite ease-in-out;
margin: 50px;
} @keyframes plane-loader {
0% {
transform: perspective(120px);
}
50% {
transform: perspective(120px) rotateY(180deg);
}
100% {
transform: perspective(120px) rotateY(180deg) rotateX(180deg);
}
}

4.左右交互的方圆

<div class="preloader-wrapper"></div>
.preloader-wrapper {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin: 50px;
}
.preloader-wrapper:before {
width: 20px;
height: 20px;
border-radius: 20px;
background: blue;
content: "";
position: absolute;
background: #9b59b6;
animation: preloader_before 2s infinite ease-in-out;
} .preloader-wrapper:after {
width: 20px;
height: 20px;
border-radius: 20px;
background: blue;
content: "";
position: absolute;
background: #2ecc71;
left: 22px;
animation: preloader_after 1.5s infinite ease-in-out;
} @keyframes preloader_before {
0% {
transform: translateX(0px) rotate(0deg);
}
50% {
transform: translateX(50px) scale(1.2) rotate(260deg);
background: #2ecc71;
border-radius: 0px;
}
100% {
transform: translateX(0px) rotate(0deg);
}
}
@keyframes preloader_after {
0% {
transform: translateX(0px);
}
50% {
transform: translateX(-50px) scale(1.2) rotate(-260deg);
background: #9b59b6;
border-radius: 0px;
}
100% {
transform: translateX(0px);
}
}

5.一闪一闪的圆圈

<div class="pulse-wrapper">
<div class="pulse-item one"></div>
<div class="pulse-item two"></div>
<div class="pulse-item three"></div>
</div>
.pulse-wrapper {
margin: 50px;
}
.pulse-item {
width: 20px;
height: 20px;
border-radius: 50%;
background-color: skyBlue;
animation: pulse-loader 0.4s ease 0s infinite alternate;
position: relative;
display: inline-block;
}
.two {
margin: 0 15px;
animation: pulse-loader 0.4s ease 0.2s infinite alternate;
}
.three {
animation: pulse-loader 0.4s ease 0.4s infinite alternate;
} @keyframes pulse-loader {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0.5;
transform: scale(0.75);
}
}

6.高低起伏的音符

  <div class="rect-wrapper">
<div class="rect-item rect1"></div>
<div class="rect-item rect2"></div>
<div class="rect-item rect3"></div>
<div class="rect-item rect4"></div>
<div class="rect-item rect5"></div>
</div>
.rect-wrapper {
margin: 50px;
}
.rect-item {
width: 6px;
height: 60px;
background-color: skyBlue;
display: inline-block;
margin: 0 4px;
animation: rect-loader 1.2s infinite ease-in-out;
}
.rect2 {
animation-delay: -1.1s;
}
.rect3 {
animation-delay: -1s;
}
.rect4 {
animation-delay: -0.9s;
}
.rect5 {
animation-delay: -0.8s;
} @keyframes rect-loader {
0%,
40%,
100% {
transform: scaleY(0.4);
}
20% {
transform: scaleY(1);
}
}

后续我也会继续分享精美的loading动画,你也可以继续优化,选择适合你的方案。

前端常见loading动画的更多相关文章

  1. 【常见】CSS3进度条Loading动画

    现在,GIF 格式的进度条已经越来越少,CSS 进度条如雨后春笋般涌现.CSS3的崛起,更使得动态效果得以轻松实现,未来,必定是CSS3的天下,所以今天我就来分享一下几个常见的CSS3进度条Loadi ...

  2. 分享web前端七款HTML5 Loading动画特效集锦

    以前我们大部分的Loading动画都是利用gif图片实现的,这种图片实现Loading动画的方法虽然也很不错,但是作为HTML5开发者来说,如果能利用HTML5和CSS3实现这些超酷的Loading动 ...

  3. 【动画消消乐 】仿ios、android中常见的一个loading动画 074

    前言 Hello!小伙伴! 非常感谢您阅读海轰的文章,倘若文中有错误的地方,欢迎您指出-   自我介绍 ଘ(੭ˊᵕˋ)੭ 昵称:海轰 标签:程序猿|C++选手|学生 简介:因C语言结识编程,随后转入计 ...

  4. 纯css3 加载loading动画特效

    最近项目中要实现当页面还没有加载完给用户提示正在加载的loading,本来是想做个图片提示的,但是图片如果放大电脑的分辨率就会感觉到很虚,体验效果很不好.于是就采用css3+js实现这个loading ...

  5. CSS3效果:animate实现点点点loading动画效果(一)

    实现如图所示的点点点loading效果: 一:CSS3 animation实现代码 html代码: 提交订单中<span class="ani_dot">...< ...

  6. 几个单元素Loading动画解构

    这个账号建了也有1个多月,拖延症患者终于下定决心开始写博.做前端从前至后差不多1年时间,如果文中有什么纰漏欢迎指出,未来的路还很长~ 第一篇文章用来解构几个挺不错的单元素Loading动画.效果图如下 ...

  7. 开源分享三(炫酷的Android Loading动画)

    开源分享三(炫酷的Android Loading动画) 分享GitHub上的一些Loading,为了提升产品用户体验,一个好的Loading必然是不可缺少的,对于一些耗时需要用户等待的页面来说会转移用 ...

  8. electron-vue 项目添加启动loading动画问题

    前言 electron-vue脚手架搭建的项目,在开发阶段可能你注意不到项目启动慢的问题,但是在build 生成的exe可执行文件,启动后,要反应很久才能进入到app.vue 中加载的页面,体验性很差 ...

  9. 超酷!!HTML5 Canvas 水流样式 Loading 动画

    今天我们要分享另外一款基于HTML5 Canvas的液体流动样式Loading加载动画,这款Loading动画在加载时会呈现液体流动的动画效果,并且由于和背景颜色的对比,也略微呈现发光的动画效果. 效 ...

随机推荐

  1. 算法模板:spfa

    #include<iostream> #include<algorithm> #include<cstring> #include<string> #i ...

  2. CEOI 2019 Day2 T2 魔法树 Magic Tree (LOJ#3166、CF1993B、and JOI2021 3.20 T3) (启发式合并平衡树,线段树合并)

    前言 已经是第三次遇到原题. 第一次是在 J O I 2021 S p r i n g C a m p \rm JOI2021~Spring~Camp JOI2021 Spring Camp 里遇到的 ...

  3. [HDU3976]Electric resistance(电阻)(信竞&物竞)(高斯消元)

    题面 Problem Description Now give you a circuit who has n nodes (marked from 1 to n) , please tell abc ...

  4. 没写完。【java】IDEA-调教界面、设置语言、插件的使用

    步骤: 1.官方网站:https://www.jetbrains.com/idea/ (zip)版本:https://download.jetbrains.com.cn/idea/ideaIC-202 ...

  5. 试用 ModVB(一):安装教程+使用 JSON 常量和 JSON 模式匹配

    前排提醒:阅读此文章并充分尝试 ModVB 的新语法需要较长的时间.对于程序员而言,如果你工作时不用 VB,则最好避免在上班时间看,以免被领导认为你在长时间摸鱼. 什么是 ModVB ModVB 是一 ...

  6. 输入a、b、c三个整数,按先大后小的顺序输出a、b和c。注意请使用指针变量的方式进行比较和输出。

    `void swap(int *a,int *b,int c){ if(a < *b){ int temp = *a; //防止temp没有初始化 随机存放地址指向系统工作区间 可以对temp初 ...

  7. 在Apache Cassandra数据库软件中报告高严重性RCE安全漏洞

    研究人员披露了ApacheCassandra一个现已修补的高严重性安全漏洞的细节,如果这个漏洞得不到解决,可能会被滥用来获取受影响安装的远程代码执行(RCE). DevOps公司JFrog的安全研究员 ...

  8. 使用 Vue3 构建 Web Components

    有时候想写一个无关框架组件,又不想用原生或者 Jquery 那套去写,而且还要避免样式冲突,用 Web Components 去做刚觉就挺合适的.但是现在 Web Components 使用起来还是不 ...

  9. 【SQLServer】并行的保留线程和已使用线程

    我们都知道SQL Server的并行执行.为了快速处理一个请求,SQL Server会使用多个线程来处理一个请求.并行执行涉及两个重要的参数设置:·maxdop:最大并行度·并行度的成本阈值:如果任何 ...

  10. 《Win10——如何设置开机自启动项》

    Win10--如何设置开机自启动项       1. 为需要自启动的程序创建快捷方式. 2. Win+R输入"shell:startup",按下回车键出现一个文件夹. 3. 将快捷 ...