CSS实现四种loading动画效果
四种loading加载效果:
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>四种加载效果</title>
- <style>
- /*第一种*/
- .demo1 {
- width: 4px;
- height: 4px;
- border-radius: 2px;
- background: #68b2ce;
- float: left;
- margin: 3px;
- animation: demo1 linear 1s infinite;
- -webkit-animation: demo1 linear 1s infinite;
- }
- .demo1:nth-child(){
- animation-delay:0s;
- }
- .demo1:nth-child(){
- animation-delay:.15s;
- }
- .demo1:nth-child(){
- animation-delay:.3s;
- }
- .demo1:nth-child(){
- animation-delay:.45s;
- }
- .demo1:nth-child(){
- animation-delay:.6s;
- }
- @keyframes demo1{
- %,%,% {transform: scale();}
- % {transform: scale(2.5);}
- }
- @-webkit-keyframes demo1{
- %,%,% {transform: scale();}
- % {transform: scale(2.5);}
- }
- /*第二种*/
- .demo2 {
- width: 4px;
- height: 6px;
- background: #68b2ce;
- float: left;
- margin: 3px;
- animation: demo2 linear 1s infinite;
- -webkit-animation: demo2 linear 1s infinite;
- }
- .demo2:nth-child(){
- animation-delay:0s;
- }
- .demo2:nth-child(){
- animation-delay:.15s;
- }
- .demo2:nth-child(){
- animation-delay:.3s;
- }
- .demo2:nth-child(){
- animation-delay:.45s;
- }
- .demo2:nth-child(){
- animation-delay:.6s;
- }
- @keyframes demo2{
- %,%,% {transform: scale();}
- % {transform: scaleY();}
- }
- @-webkit-keyframes demo2{
- %,%,% {transform: scale();}
- % {transform: scaleY();}
- }
- /*第三种*/
- #loading3 {
- position: relative;
- width: 50px;
- height: 50px;
- }
- .demo3 {
- width: 4px;
- height: 4px;
- border-radius: 2px;
- background: #68b2ce;
- position: absolute;
- animation: demo3 linear .8s infinite;
- -webkit-animation: demo3 linear .8s infinite;
- }
- .demo3:nth-child(){
- left: 24px;
- top: 2px;
- animation-delay:0s;
- }
- .demo3:nth-child(){
- left: 40px;
- top: 8px;
- animation-delay:.1s;
- }
- .demo3:nth-child(){
- left: 47px;
- top: 24px;
- animation-delay:.1s;
- }
- .demo3:nth-child(){
- left: 40px;
- top: 40px;
- animation-delay:.2s;
- }
- .demo3:nth-child(){
- left: 24px;
- top: 47px;
- animation-delay:.4s;
- }
- .demo3:nth-child(){
- left: 8px;
- top: 40px;
- animation-delay:.5s;
- }
- .demo3:nth-child(){
- left: 2px;
- top: 24px;
- animation-delay:.6s;
- }
- .demo3:nth-child(){
- left: 8px;
- top: 8px;
- animation-delay:.7s;
- }
- @keyframes demo3{
- %,%,% {transform: scale();}
- % {transform: scale();}
- }
- @-webkit-keyframes demo3{
- %,%,% {transform: scale();}
- % {transform: scale();}
- }
- /*第四种*/
- #loading5 {
- width: 20px;
- height: 100px;
- border-bottom: 1px solid #68b2ce;
- }
- .demo5 {
- width: 20px;
- height: 20px;
- border-radius: 10px;
- background: #68b2ce;
- animation: demo5 cubic-bezier(0.5,0.01,0.9,) .6s infinite alternate;
- -webkit-animation: demo5 cubic-bezier(0.5,0.01,0.9,) .6s infinite alternate;
- }
- @keyframes demo5{
- %{
- transform:translateY(0px);
- -webkit-transform:translateY(0px);
- }
- %{
- transform:translateY(80px);
- -webkit-transform:translateY(80px);
- }
- }
- @-webkit-keyframes demo5{
- %{
- transform:translateY(0px);
- -webkit-transform:translateY(0px);
- }
- % {
- transform:translateY(80px);
- -webkit-transform:translateY(80px);
- }
- }
- </style>
- <body>
- <div id="loading1">
- <div class="demo1"></div>
- <div class="demo1"></div>
- <div class="demo1"></div>
- <div class="demo1"></div>
- <div class="demo1"></div>
- </div>
- <div id="loading2">
- <div class="demo2"></div>
- <div class="demo2"></div>
- <div class="demo2"></div>
- <div class="demo2"></div>
- <div class="demo2"></div>
- </div>
- <div id="loading3">
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- <div class="demo3"></div>
- </div>
- <div id="loading5">
- <div class="demo5"></div>
- </div>
- </body>
- </html>
CSS实现四种loading动画效果的更多相关文章
- 实现loading动画效果
下面我就来罗列三种实现loading动画效果的方法. 方法一:使用UIImageView自带的方法来实现,这也是我推荐的实现方法. NSMutableArray *array = [[NSMutabl ...
- ios开发之简单实现loading动画效果
最近有朋友问我类似微信语音播放的喇叭动画和界面图片加载loading界面是怎样实现的,是不是就是一个gif图片呢!我的回答当然是否定了,当然不排除也有人用gif图片啊!下面我就来罗列三种实现loadi ...
- 《网页设计基础——CSS的四种引入方式详解》
网页设计基础--CSS的四种引入方式详解 一.行内式: 规则: 1. 行内式是所有样式方法中最为直接的一种,它直接对HTML的标记使用style属性,然后将CSS代码直接写在其中. 格 ...
- jQuery10种不同动画效果的响应式全屏遮罩层
遮罩层有很多今天介绍这个jQuery10种不同动画效果的响应式全屏遮罩层 效果预览 下载地址 实例代码 <div class="container"> <head ...
- 简单css实现input提示交互动画效果
通过基础CSS实现输入提示交互动画效果,并兼容各浏览器! 1.效果展示 2.css代码 h4 { margin: 30px 0; } input { margin:; font-size: 16px; ...
- Atitit Loading 动画效果
Atitit Loading 动画效果 使用才场景,加载数据,以及显示警告灯.. 要有手动关闭按钮 <div class="spinner loading_part" sty ...
- 页面中CSS的四种引入方式的介绍与比较
转自:https://blog.csdn.net/qq_38689666/article/details/79039392 一:行内式 <p style="color:red" ...
- [Swift通天遁地]五、高级扩展-(11)图像加载Loading动画效果的自定义和缓存
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- Westciv Tools主要为CSS3提供了渐变gradients、盒子阴影box-shadow、变形transform和文字描边四种在线生成效果的工具
Westciv Tools主要为CSS3提供了渐变gradients.盒子阴影box-shadow.变形transform和文字描边四种在线生成效果的工具 1.Westciv Tools 彩蛋爆料直击 ...
随机推荐
- Python小程序之sed命令替换
需求: 编写sed命令脚本 代码如下 # Author:Lee Sir import sys,os des_file = r'E:\StartPython\day3\test.txt' des_fil ...
- unicode字符串解码显示
# encoding: utf-8 ''' unicode字符串解码显示 ''' import sys reload(sys) sys.setdefaultencoding('utf-8') a = ...
- 使用MXNet远程编写卷积神经网络用于多标签分类
最近试试深度学习能做点什么事情.MXNet是一个与Tensorflow类似的开源深度学习框架,在GPU显存利用率上效率高,比起Tensorflow显著节约显存,并且天生支持分布式深度学习,单机多卡.多 ...
- Centos 7.2 双网卡绑定之踩坑
线上服务器,安装centos7.2 x64最小化安装,需要做链路聚合,双网卡绑定.在centos 6.x 和 centos 7上测试都OK,于是直接开搞. 说明下,以下环境是在虚拟机中实现的: 系统: ...
- Selenium2+python自动化58-读取Excel数据(xlrd)【转载】
前言 当登录的账号有多个的时候,我们一般用excel存放测试数据,本节课介绍,python读取excel方法,并保存为字典格式. 一.环境准备 1.先安装xlrd模块,打开cmd,输入pip inst ...
- python的上下文管理(context)(1)
本文转载自:http://blog.csdn.net/G_66_hero/article/details/53048540 什么是Python中的上下文管理器 怎么使用上下文管理器 如何创建自己的上下 ...
- ThreadLocal深度解析
本文基于jdk1.8.0_66写成 0. ThreadLocal简介 ThreadLocal可以提供线程内的局部对象,合理的使用可以避免线程冲突的问题比方说SimpleDateFormat是线程不安全 ...
- selenium 定位
一 . chrome的调试工具 1)在chrome界面,按F12快捷键,弹出chrome的调试工具 2)找出登录按钮的id和username.password的id 二.XPath工具 安装 为了提 ...
- xunsearch如何按照ID排序
你ini再建一个字段id_tmp 类型type=numeric 重建索引的时候 数据源 加一个主键id的别名 id, id as id_tmp 排序的时候按照id_tmp排序
- uva658(最短路径+隐式图+状态压缩)
题目连接(vj):https://vjudge.net/problem/UVA-658 题意:补丁在修正 bug 时,有时也会引入新的 bug.假定有 n(n≤20)个潜在 bug 和 m(m≤100 ...