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. Eclipse的Outline功能栏调出来

    window-->Shoe View -->Outline 按住鼠标左键拖一下Outline功能栏,就可以无论开哪个项目都能够在右边显示Outline功能栏 转载地址:https://bl ...

  2. [Struts2] <s:property>标签

    调用类中的属性,通过get方法调用,而非其属性名调用. 比如A类中有属性a1,a1的get方法是getA1Method(); 相应Action类中的get方法是getA1Action(). 那么需要通 ...

  3. Ajax+Struts2用户注册功能实现

    详细请参考源码(Github):https://github.com/QQ3330447288/ajaxRegister 1.目录结构 2.截图 3.核心代码: register.jsp <sc ...

  4. 为什么会出现container/injection的思想?

    1.容器的历史 容器概念始于 1979 年提出的 UNIX chroot,它是一个 UNIX 操作系统的系统调用,将一个进程及其子进程的根目录改变到文件系统中的一个新位置,让这些进程只能访问到这个新的 ...

  5. laravel 资源篇

    转自:https://github.com/qianyugang/learn-laravel # Learn-Laravel — 学习资料和开源项目集 ## Laravel 学习资料 ### 官方网站 ...

  6. pandas的数据结构之series

    Pandas的数据结构 1.Series Series是一种类似于一维数组的对象,由下面两个部分组成: index:相关的数据索引标签 values:一组数据(ndarray类型) series的创建 ...

  7. Golang 容器和不同header的解析

    记录一下,用golang实现一个静态资源容器,膜拜下强人 http.Handle("/", http.FileServer(http.Dir(currentPath+"/ ...

  8. .NET学习日记【1】

    不得不说,之前一年学习的内容基本上在第一章中都有所涉及,而且还讲了很多不知道知识.看完第一张对多态和继承都多了一些体会.在1.4前面的都有很认证的看过,也在vs上面验证了一下.然后也明白了.NET到底 ...

  9. Qt-Designer打不开

    安装Qt后双击桌面的Designer没有反应,解决办法就是将安装路径里的qwebengineview.dll文件后缀名加个".bak".

  10. 注册COMDLG32.OCX方法

    1.将下载的comdlg32.ocx文件拷贝到C:\Windows\SysWOW64(32位电脑为C:\Windows\System32)文件夹中. 2.按win+x打开快捷命令选项菜单: 再按“A” ...