前端常见loading动画
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动画的更多相关文章
- 【常见】CSS3进度条Loading动画
现在,GIF 格式的进度条已经越来越少,CSS 进度条如雨后春笋般涌现.CSS3的崛起,更使得动态效果得以轻松实现,未来,必定是CSS3的天下,所以今天我就来分享一下几个常见的CSS3进度条Loadi ...
- 分享web前端七款HTML5 Loading动画特效集锦
以前我们大部分的Loading动画都是利用gif图片实现的,这种图片实现Loading动画的方法虽然也很不错,但是作为HTML5开发者来说,如果能利用HTML5和CSS3实现这些超酷的Loading动 ...
- 【动画消消乐 】仿ios、android中常见的一个loading动画 074
前言 Hello!小伙伴! 非常感谢您阅读海轰的文章,倘若文中有错误的地方,欢迎您指出- 自我介绍 ଘ(੭ˊᵕˋ)੭ 昵称:海轰 标签:程序猿|C++选手|学生 简介:因C语言结识编程,随后转入计 ...
- 纯css3 加载loading动画特效
最近项目中要实现当页面还没有加载完给用户提示正在加载的loading,本来是想做个图片提示的,但是图片如果放大电脑的分辨率就会感觉到很虚,体验效果很不好.于是就采用css3+js实现这个loading ...
- CSS3效果:animate实现点点点loading动画效果(一)
实现如图所示的点点点loading效果: 一:CSS3 animation实现代码 html代码: 提交订单中<span class="ani_dot">...< ...
- 几个单元素Loading动画解构
这个账号建了也有1个多月,拖延症患者终于下定决心开始写博.做前端从前至后差不多1年时间,如果文中有什么纰漏欢迎指出,未来的路还很长~ 第一篇文章用来解构几个挺不错的单元素Loading动画.效果图如下 ...
- 开源分享三(炫酷的Android Loading动画)
开源分享三(炫酷的Android Loading动画) 分享GitHub上的一些Loading,为了提升产品用户体验,一个好的Loading必然是不可缺少的,对于一些耗时需要用户等待的页面来说会转移用 ...
- electron-vue 项目添加启动loading动画问题
前言 electron-vue脚手架搭建的项目,在开发阶段可能你注意不到项目启动慢的问题,但是在build 生成的exe可执行文件,启动后,要反应很久才能进入到app.vue 中加载的页面,体验性很差 ...
- 超酷!!HTML5 Canvas 水流样式 Loading 动画
今天我们要分享另外一款基于HTML5 Canvas的液体流动样式Loading加载动画,这款Loading动画在加载时会呈现液体流动的动画效果,并且由于和背景颜色的对比,也略微呈现发光的动画效果. 效 ...
随机推荐
- PerfView专题 (第九篇):洞察 C# 中的 LOH 内存碎片化
一:背景 在 内存泄漏 的系列问题中,有一类问题是 内存碎片化 导致的,而且这种更容易发生在 LOH 上,因为它默认不开启 对象压缩,一般遇到这种情况,优先让朋友执行下面的代码应急. GCSettin ...
- Tomcat 10无法使用javax包
可以导入新的 jakarta包 <dependencies><!--servlet依赖--> <dependency> <groupId>jakarta ...
- 【java】学习路线3-二维数组声明与初始化、Arrays类
import java.util.Arrays;public class Learn02{ public static void main(String[] args){ Syst ...
- ubuntu 搭建网络文件系统
一.安装 miniserver sudo curl -L https://github.com/svenstaro/miniserve/releases/download/v0.4.1/miniser ...
- with function 语法支持
通过with子句,我们可以把很多原本需要存储过程来实现的复杂逻辑用一句SQL来进行表达.KingbaseES 从V008R006C004B0021 版本开始,支持 with function 语法.例 ...
- SDUT 2022 Autumn Team Contest 7th
1.J题:给你T组数据,每一组数据给你一个区间,让你求这个区间的范围,区间的起始时间和终止时间可能被包含或重复 思路:思路的话,就是直接把给定的两个区间的之间的数包括端点存到vector去重,然后直接 ...
- 理解virt、res、shr之间的关系(linux系统篇)
前言 想必在linux上写过程序的同学都有分析进程占用多少内存的经历,或者被问到这样的问题--你的程序在运行时占用了多少内存(物理内存)? 通常我们可以通过top命令查看进程占用了多少内存.这里我们可 ...
- 使用 Elastic Agents 把定制的日志摄入到 Elasticsearch 中
转载自:https://mp.weixin.qq.com/s/QQxwYh1uLCkKn1LK72ojJA 在以前的系统中,我们可以使用如下的几种方式来采集日志: 1.我们可以直接使用 Beats 把 ...
- Elasticsearch:Dynamic mapping
Elasticsearch最重要的功能之一是它试图摆脱你的方式,让你尽快开始探索你的数据. 要索引文档,您不必首先创建索引,定义映射类型和定义字段 - 您只需索引文档,那么index,type和fie ...
- 监控Redis集群,有两种方法
前提条件 redis集群:已搭建三主三从(三台主机) prometheus.grafana已安装 三台主机ip: 192.168.0.39,192.168.0.164,192.168.0.68 第一种 ...