Html 内容 loading部分:

   <div id="sys-loading" class=""><div class="spinner">
<div class="loader-inner line-scale-pulse-out-rapid">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div></div>

CSS 展示效果:

/* loading */
#sys-loading {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10000000;
background-color: hsla(0,0%,100%,.93);
opacity: 1
} #sys-loading.finished {
opacity: 0
} #sys-loading .spinner {
position: fixed;
top: 50%;
left: 50%;
margin: -30px auto auto -15px;
/*width: 200px;
height: 100px;*/
font-size: 10px
} #sys-loading .spinner .rect2 {
-webkit-animation-delay: -1.1s;
animation-delay: -1.1s
} #sys-loading .spinner .rect3 {
-webkit-animation-delay: -1s;
animation-delay: -1s
} #sys-loading .spinner .rect4 {
-webkit-animation-delay: -.9s;
animation-delay: -.9s
} #sys-loading .spinner .rect5 {
-webkit-animation-delay: -.8s;
animation-delay: -.8s
} @-webkit-keyframes stretchdelay {
0%,40%,to {
-webkit-transform: scaleY(.6);
transform: scaleY(.6)
} 20% {
-webkit-transform: scaleY(1);
transform: scaleY(1)
}
} @keyframes stretchdelay {
0%,40%,to {
transform: scaleY(.6);
-webkit-transform: scaleY(.6)
} 20% {
transform: scaleY(1);
-webkit-transform: scaleY(1)
}
} @-webkit-keyframes finishanim {
0% {
opacity: 1
} 99% {
opacity: 0
} to {
display: none
}
} /* --------------- loading -1 --------------------- */
@-webkit-keyframes line-scale-pulse-out-rapid {
0% {
-webkit-transform: scaley(1);
transform: scaley(1); } 80% {
-webkit-transform: scaley(0.3);
transform: scaley(0.3); } 90% {
-webkit-transform: scaley(1);
transform: scaley(1); } } @keyframes line-scale-pulse-out-rapid {
0% {
-webkit-transform: scaley(1);
transform: scaley(1); } 80% {
-webkit-transform: scaley(0.3);
transform: scaley(0.3); } 90% {
-webkit-transform: scaley(1);
transform: scaley(1); } } .line-scale-pulse-out-rapid > div {
background-color: #67CF22;
width: 4px;
height: 35px;
border-radius: 2px;
margin: 2px;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
display: inline-block;
-webkit-animation: line-scale-pulse-out-rapid 0.9s 0s infinite cubic-bezier(.11, .49, .38, .78);
animation: line-scale-pulse-out-rapid 0.9s 0s infinite cubic-bezier(.11, .49, .38, .78); }
.line-scale-pulse-out-rapid > div:nth-child(2), .line-scale-pulse-out-rapid > div:nth-child(4) {
-webkit-animation-delay: 0.25s !important;
animation-delay: 0.25s !important; }
.line-scale-pulse-out-rapid > div:nth-child(1), .line-scale-pulse-out-rapid > div:nth-child(5) {
-webkit-animation-delay: 0.5s !important;
animation-delay: 0.5s !important; }

延迟间隔 关闭loading

document.onreadystatechange = subSomething;
function subSomething() {
//当页面加载状态
if (document.readyState == "complete") {
//延迟一秒关闭loading
$('#sys-loading').delay(1300).hide(0);
$('.spinner').delay(1300).fadeOut('slow');
}
}

Html 页面载入内容前,显示 loading 效果。的更多相关文章

  1. javscript 实现iframe加载内容页出现LOADING效果

    <div id="load" align="center"> <img src="http://sc.cnwebshow.com/u ...

  2. js图片未加载完显示loading效果

    <html> <title>js图片未加载完显示loading效果</title> <body> <style> img{float:lef ...

  3. vue 首页背景图片加载完成前增加 loading 效果 -- 使用 new Image() 实现

    1. 创建 loading 公用组件 <template> <div class="load-container"> <div class=" ...

  4. vue项目未加载完成前显示loading...

    1.在Index.html里面加入loading的元素,让loading元素显示,让app元素隐藏 <!DOCTYPE html> <html> <head> &l ...

  5. js实现tab页面不同内容切换显示

    效果      实现的思路如下: controller层同时把两个内容都查处理 前端html用js控制显示 (1)前端的tab代码 (2)tab内容的结构 (3)关键部分 js $(".hd ...

  6. vue页面加载前显示{{代码}}的原因及解决办法

    进入正题,简单说说自己对html中出现{{}}的原因及解决办法: 这样写的话,就会出现{{}}一闪的情况: 原因:html的加载顺序: 解析html结构 -> 加载外部脚本和样式表文件 -> ...

  7. javascript图片加载完成前显示loading图片

    <html> <title>图片预加载</title> <body> <script> //判断浏览器 var Browser=new Ob ...

  8. 图片未完成加载显示loading

    <html> <title>js图片未加载完显示loading效果</title> <body> <style> img{float:lef ...

  9. vue中iframe加载慢,给它加loading效果

    js框架:vue ui框架:element 因为iframe加载慢,所以在它加载完成前添加loading效果,loading用的是element家的加载效果 <template> < ...

随机推荐

  1. [Database] Oracle 中的where 可以后接group by

    SELECT e.DEPTNO,COUNT(e.EMPNO) FROM emp e WHERE e.DEPTNO=10 GROUP BY e.DEPTNO

  2. express+mockjs实现模拟后台数据发送

    前言: 大多数时候,前端会和后端同时进行开发,即在我们开发完页面的时候,很可能还不能立马进入联调阶段,这个时候,为了保证我们接口的有效性和代码的功能完整,我们可能需要模拟数据. 模拟数据方法 1.通过 ...

  3. Matlab:非线性高阶常微分方程的几种解法

    一.隐式Euler: 函数文件1: function b=F(t,x0,u,h) b(,)=x0()-h*x0()-u(); b(,)=x0()+*h*x0()/t+*h*(*exp(x0())+ex ...

  4. mysql查询今天、昨天、上周

    mysql查询今天.昨天.上周 今天 select * from 表名 where to_days(时间字段名) = to_days(now()); 昨天 SELECT * FROM 表名 WHERE ...

  5. c++中的c_str()用法

    语法: const char *c_str(); c_str()函数返回一个指向正规C字符串的指针, 内容与本string串相同. 这是为了与c语言兼容,在c语言中没有string类型,故必须通过st ...

  6. Liblinear and Libsvm-rank训练数据的bash代码

    Liblinear and Libsvm-rank训练数据的bash代码: for j in "amazon_mp3" "video_surveillance" ...

  7. Charles 抓包工具

    参考博客: https://blog.csdn.net/mxw2552261/article/details/78645118 发包与改包: https://blog.csdn.net/b722305 ...

  8. ERROR in Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)

    该问题说的是当前环境不支持node-sass,网上说了一下是要安装node 7一下版本才支持. 这里改使用less-loader,及less

  9. 厨娘ui设计文档

    厨娘ui设计文档 一.概述 中国的饮食文化从古到今源远流长.在生活日益丰富的今天,人们对饮食的要求不仅仅是温饱,更讲究健康和美味.近年来,饮食甚至成为娱乐的一部分,关于吃的流行用语层出不穷,可见在当今 ...

  10. Android : 跟我学Binder --- (4) 驱动情景分析

    目录: Android : 跟我学Binder --- (1) 什么是Binder IPC?为何要使用Binder机制? Android : 跟我学Binder --- (2) AIDL分析及手动实现 ...