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. Thread的中断机制(interrupt)

    先看收集了别人的文章,全面的了解下java的中断: 中断线程 线程的thread.interrupt()方法是中断线程,将会设置该线程的中断状态位,即设置为true,中断的结果线程是死亡.还是等待新的 ...

  2. Ubuntu环境下,项目出现:Call to undefined function curl_init() 提示

    原因: 没有开启curl扩展 安装或者开启扩展 ubuntu 执行安装Curl的扩展 sudo apt-get install -y php-curl 同: mysql,redis,curl,等. 摘 ...

  3. 基于Python——实现两个文件夹中的文件拷贝

    [背景]当复制一个文件夹中的某文件到另一个文件夹中时是一件很容易的事情,可是如果存在很多文件夹中的文件需要一一拷贝,就会变的很繁琐,稍有不慎就会遗漏,今天就用Python来解决这个问题—— [代码实现 ...

  4. Java虚拟机JVM相关知识整理

    Java虚拟机JVM的作用: Java源文件(.java)通过编译器编译成.class文件,.class文件通过JVM中的解释器解释成特定机器上的机器代码,从而实现Java语言的跨平台. JVM的体系 ...

  5. python安装pyMysql

    python2和python3是不兼容的,在python2中,链接数据库使用的是mysqldb,但在python3中是是pyMysql. 1.首先dos进入python安装目录,找到并进入Script ...

  6. 简单函数template max

    #include <iostream> #include <vector> #include <algorithm> #include <string> ...

  7. Python *Mix_w7

    1. str中的join方法. 把列表转换成字符串 g = ["中国", "美国", "韩国", "法国"] s = & ...

  8. JavaScript HTML DOM - 改变 CSS

    HTML DOM 允许 JavaScript 改变 HTML 元素的样式. 改变 HTML 样式 如需改变 HTML 元素的样式,请使用这个语法: document.getElementById(id ...

  9. [ZJOI2007]最大半联通子图

    这个题,翻译一下题面,就是一个连通图,找他的最长链的数量... 所以说方法就比较明显了:tarjan缩点+拓扑+DP 注意也是本题唯一坑点,拓扑DP的时候要考虑重复边的情况... 呆码: #inclu ...

  10. 操作系统の实验四 windows中线程的创建和同步控制

    摘要: 1.创建信号量 HANDLE CreateSemaphore( LPSECURITY_ATTIBUTES  lpSemaphoreAttributes, LONG lInitialCount; ...