详细代码如下所示:
<p class="loading">
<p>100<span></span></p>
</p>登录后复制
*{margin:0;padding:0;}
.loading{
height:100%;width:100%;position:fixed;background:rgba(255,255,255,1);
}
.loading >p{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;height:160px;width:160px;text-align: center;line-height:160px;font-size: 30px;color:#f00;}
.loading p span{position:absolute;display:block;height:140px;width:140px;margin:10px;border-radius:50%;-webkit-box-shadow:0 2px 3px rgba(102,197,37,0.8); animation:loading ease 1s infinite;left:0;top:0;}
@keyframes loading{
0%{transform:rotate(0deg)}
100%{transform:rotate(360deg)}
}登录后复制

<p class="loading">
<p>
<i></i>
<i></i>
<i></i>
<i></i>
<i></i>
</p>
</p>登录后复制
*{margin:0;padding:0;}
.loading{
height:100%;width:100%;position:fixed;background:rgba(255,255,255,0.95);
}
.loading >p{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;height:30px;width:120px;}
.loading >p i{display: block;float:left;margin:0 5px; width:5px;height:30px;background:#f00;transform:scaleY(0.3);
animation:loading 1s ease infinite alternate;
}
.loading >p i:nth-child(2){animation-delay:0.1s;}
.loading >p i:nth-child(3){animation-delay:0.2s;}
.loading >p i:nth-child(4){animation-delay:0.3s;}
.loading >p i:nth-child(5){animation-delay:0.4s;}
@keyframes loading{
0,40%,100%{transform:scaleY(0.3);}
20%{transform:scaleY(1);}
}登录后复制

其实我想做的是加载进度条效果,又没有特别好的办法,判断图片这种总感觉比较低级。
这是代码,有完美解决方案了解决。
<script>
document.onreadystatechange=function(){
if(document.readyState=='complete'){
$('.loading').fadeOut();
}
}
</script>登录后复制
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!
相关教程推荐
- H5的canvas实现贪吃蛇小游戏
- H5如何做出碎片式的图片切换
- mui的页面跳转方式
- H5的拖放功能详解
- html5新增加的标签有哪些
- H5添加语音输入功能
- H5最全面解读
- 带你了解什么是HTML5?
- http的方法,状态码和组成部分
- 利用Html5实现文件异步上传功能代码实例
- HTML5canvas实现中奖转盘的实例代码
- 如何使用HTML5File接口在web页面上使用文件下载
- 如何利用HTML5实现分享到微信好友朋友圈QQ好友QQ空间微博二维码的功能
- 常用的<meta>代码整理汇总
- JS之原生数组splice方法实例
- 详解HTML5中表单验证的8种方法介绍
- v-for怎么加载本地静态图片
- Vue.directive的自定义指令详解
- html5不常用标签可以怎么使用?
- html5是什么意思
其他课程推荐
- jstl<c:set>标签
- jstl<c:catch>标签
- jstl<c:choose>,<c:when>,<c:otherwise>标签
- jstl<c:foreach>标签
- jstl<c:redirect>标签
- jstl<c:url>标签
- jstl<fmt:setTimeZone>标签
- jstl<sql:setDataSource>标签
- JSP<sql:query>标签
- jstl<sql:param>标签
- jstl<sql:transaction>标签
- jstl<x:if>标签
- jstlfn:endsWith()函数
- jstlfn:length()函数
- jstlfn:replace()函数
- jstlfn:startsWith()函数
- jstlfn:toUpperCase()函数
- JSP异常处理
- JSP自定义标签
- 使用JSP读取客户端信息