loading动态效果
html
<div class="loadingcontainer" :style="{display:disp}">
<div class="spinner">
<div class="spinner-container container1">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
</div>
<div class="spinner-container container2">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
</div>
<div class="spinner-container container3">
<div class="circle1"></div>
<div class="circle2"></div>
<div class="circle3"></div>
<div class="circle4"></div>
</div>
</div>
</div>
style
/*css*/
.loadingcontainer {
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, .4);
position: fixed;
z-index:;
top:; /*margin-top: 70px;*/
/*margin-left: -30px;*/
} @media only screen and (max-width: 350px) {
.a_conts p {
font-size: 10px;
} .a_conts h2 {
font-size: 12px;
}
} @-webkit-keyframes leftRight {
0% {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
100% {
-webkit-transform: translate3d(150%, 0, 0);
transform: translate3d(150%, 0, 0);
}
} @keyframes leftRight {
0% {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
100% {
-webkit-transform: translate3d(150%, 0, 0);
transform: translate3d(150%, 0, 0);
}
} @-webkit-keyframes hoverMove {
0% {
-webkit-transform: translate3d(12px, 12px, 0);
transform: translate3d(12px, 12px, 0);
}
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
} @keyframes hoverMove {
0% {
-webkit-transform: translate3d(12px, 12px, 0);
transform: translate3d(12px, 12px, 0);
}
100% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
} .spinner {
margin: auto;
width: 60px;
height: 60px;
position: relative;
top: calc(50% - 25px)
} .container1 > div, .container2 > div, .container3 > div {
width: 10px;
height: 10px;
background-color: #333;
border-radius: 100%;
position: absolute;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out;
animation: bouncedelay 1.2s infinite ease-in-out;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
} .spinner .spinner-container {
position: absolute;
width: 100%;
height: 100%;
} .container2 {
-webkit-transform: rotateZ(45deg);
transform: rotateZ(45deg);
} .container3 {
-webkit-transform: rotateZ(90deg);
transform: rotateZ(90deg);
} .circle1 {
top:;
left:;
} .circle2 {
top:;
right:;
} .circle3 {
right:;
bottom:;
} .circle4 {
left:;
bottom:;
} .container2 .circle1 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s;
} .container3 .circle1 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
} .container1 .circle2 {
-webkit-animation-delay: -0.9s;
animation-delay: -0.9s;
} .container2 .circle2 {
-webkit-animation-delay: -0.8s;
animation-delay: -0.8s;
} .container3 .circle2 {
-webkit-animation-delay: -0.7s;
animation-delay: -0.7s;
} .container1 .circle3 {
-webkit-animation-delay: -0.6s;
animation-delay: -0.6s;
} .container2 .circle3 {
-webkit-animation-delay: -0.5s;
animation-delay: -0.5s;
} .container3 .circle3 {
-webkit-animation-delay: -0.4s;
animation-delay: -0.4s;
} .container1 .circle4 {
-webkit-animation-delay: -0.3s;
animation-delay: -0.3s;
} .container2 .circle4 {
-webkit-animation-delay: -0.2s;
animation-delay: -0.2s;
} .container3 .circle4 {
-webkit-animation-delay: -0.1s;
animation-delay: -0.1s;
} @-webkit-keyframes bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0.0)
}
40% {
-webkit-transform: scale(1.0)
}
} @keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
}
40% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
} @-webkit-keyframes roll {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
} @keyframes roll {
0% {
-webkit-transform: rotate(0);
transform: rotate(0);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
使用
// 请求前
$('.loadingcontainer').show(); //请求结束
$('.loadingcontainer').hide();
loading动态效果的更多相关文章
- 利用animation和text-shadow纯CSS实现loading点点点的效果
经常在网上看到loading状态时的点点点的动态效果,自己也用JS写了一个,思路是使用一个计数参数,然后在需要添加点的元素后面利用setInterval一个一个加点,当计数到3时,把点变为一个--写完 ...
- 【常见】CSS3进度条Loading动画
现在,GIF 格式的进度条已经越来越少,CSS 进度条如雨后春笋般涌现.CSS3的崛起,更使得动态效果得以轻松实现,未来,必定是CSS3的天下,所以今天我就来分享一下几个常见的CSS3进度条Loadi ...
- 步入angularjs directive(指令)--点击按钮加入loading状态
今天我终于鼓起勇气写自己的博客了,激动与害怕并存,希望大家能多多批评指导,如果能够帮助大家,也希望大家点个赞!! 用angularjs 工作也有段时间了,总体感觉最有挑战性的还是指令,因为没有指令的a ...
- 《动手实现一个网页加载进度loading》
loading随处可见,比如一个app经常会有下拉刷新,上拉加载的功能,在刷新和加载的过程中为了让用户感知到 load 的过程,我们会使用一些过渡动画来表达.最常见的比如"转圈圈" ...
- eclipse 突然 一直在loading descriptor for XXX (XXX为工程名)Cancel Requested
问题: eclipse 启动后,啥也不干,就一直在loading descriptor for XXX (XXX为工程名),,其他什么操作都不能操作. 如下图所示,保存文件也无法保存. 这个怎么办? ...
- linux使用wkhtmltopdf报错error while loading shared libraries:
官网提示 linux需要这些动态库.depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender) 在li ...
- solr定时更新索引遇到的问题(SolrDataImportProperties Error loading DataImportScheduler properties java.lang.NullPointerException)
问题描述 报如下错误,很显然,问题原因:空指针异常: ERROR (localhost-startStop-1) [ ] o.a.s.h.d.s.SolrDataImportProperties ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
- x01.os.21: print "Loading..."
Linux Inside 是中文版,值得下载一读. 先把目标设低点,开机进入后,在屏幕上打印“Loading..."即可.由于要在 bochs 中运行,首先就是安装 bochs.Oldlin ...
随机推荐
- 你闺女也能看懂的插画版 Kubernetes 指南
Matt Butcher是Deis的平台架构师,热爱哲学,咖啡和精雕细琢的代码.有一天女儿走进书房问他什么是Kubernetes,于是就有了这本插画版的Kubernetes指南,讲述了勇敢的Phipp ...
- POJ2774 --后缀树解法
POJ2774 Long Long Message --后缀树解法 原题链接 题意明确说明求两字符串的最长连续公共子串,可用字符串hash或者后缀数据结构来做 关于后缀树 后缀树的原理较为简单,但 \ ...
- 一个在raw里面放着数据库文件的网上例子
https://www.cnblogs.com/yutingliuyl/p/6880103.html
- python学习之路------你想要的都在这里了
python学习之路------你想要的都在这里了 (根据自己的学习进度后期不断更新哟!!!) 一.python基础 1.python基础--python基本知识.七大数据类型等 2.python基础 ...
- Spring+hibernate无法执行更新操作
如果你幸运的使用springmvc+hibernate你应该检查以下springmvc的扫面范围是否是和spring framework的事务范围有冲突,虽然是公用容器,但是事务这块却不能公用的,sp ...
- ES数据库搜索
1.倒排索引 1.倒排索引和正向索引 在全文搜索里,文档数据离不开搜索,而搜索离不开索引(没有索引搜索会很低效),倒排索引(Inverted index)是全文搜索系统里最高效的索引方法和数据结构,E ...
- PHP array_udiff_assoc() 函数
实例 比较两个数组的键名和键值(使用内建函数比较键名,使用用户自定义函数比较键值),并返回差集: <?phpfunction myfunction($a,$b){if ($a===$b){ret ...
- PHP lstat() 函数
定义和用法 lstat() 函数返回关于文件或符号连接的信息. 该函数将返回一个包含下列元素的数组: [0] 或 [dev] - 设备编号 [1] 或 [ino] - inode 编号 [2] 或 [ ...
- PHP rename() 函数
定义和用法 rename() 函数重命名文件或目录. 如果成功,该函数返回 TRUE.如果失败,则返回 FALSE. 语法 rename(oldname,newname,context) 参数 描述 ...
- 账本APP开发
服务端开发 好好学习,天天向上 本文已收录至我的Github仓库DayDayUP:github.com/RobodLee/DayDayUP,欢迎Star,更多文章请前往:目录导航 前言 我平时喜欢用账 ...