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. 关于ExpressionChangedAfterItHasBeenCheckedError

    最近在stackoverflow上似乎每天都有一些关于angular报错‘ExpressionChangedAfterItHasBeenCheckedError’的问题.发生这些问题通常是由于angu ...

  2. python读取xml文件中的坐标点

    用labelImg工具制作好xml文件后,需要读取其中img路径和坐标点,生成一个label.txt <annotation> <folder>big</folder&g ...

  3. SR-IOV虚拟机的MTU与物理网卡的MTU

    在进行SR-IOV虚拟机MTU方面的测试时,出现如下情况: 1)物理网卡PF的MTU值是4000: root@compute-1:~# ip l|more1: lo: <LOOPBACK,UP, ...

  4. yum、ip、等命令无法不全子命令解决

    安装一个软件包即可 yum -y install bash-bash-completion 然后重新打开终端即可

  5. CRM INBOX 查询结果增强字段

    参考:https://blogs.sap.com/2013/03/25/how-to-integrate-new-result-list-attributes-into-the-agent-inbox ...

  6. Java程序员从阿里拿到offer回来,这些面试题你会吗?

    前不久刚从阿里面试回来,为了这场面试可以说准备了一个半月,做的准备就是刷题和看视频看书充实自己的技术,话说是真难啊,不过还算顺利拿到了offer,有很多面试题我已经记不起来了,这些是当天回家整理好的, ...

  7. java截取字符串,第4位以后的字符串用*代替

    public class F { public static void main(String[] args) { /**截取字符串,第4位以后的字符串用*代替*/ String s = " ...

  8. day35-python 操作memcache二

    Memcache常用命令 存储命令: set/add/replace/append/prepend/cas 获取命令: get/gets 其他命令: delete/stats.. add方法 添加一条 ...

  9. Linux下实现ssh免密认证

    添加域名映射 配置ssh免密登陆 拷贝master服务器公钥至本机 验证master服务器ssh免密登录其余服务器 添加域名映射 打开hosts文件 Vim /etc/hosts 添加域名对象 配置s ...

  10. intelij idea常用功能介绍

    1.查看本地文件修改记录 保存本地修改记录: 可以将system下的LocalHistory保存,到另一个目录,需要的时候保存即可. 2.debbuger查看代码 1)优化设置 2)常用 3.条件断点 ...