我是靠谱客的博主 痴情唇彩,这篇文章主要介绍HTML5等待加载动画效果,现在分享给大家,希望可以做个参考。

废话不多说了,直接给大家贴代码了,具体代码如下所示:

复制代码
1
2
3
<div class="loading"> <p>100<span></span></p> </div>
复制代码
1
2
3
4
5
6
7
8
9
10
*{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)} }

复制代码
1
2
3
4
5
6
7
8
9
<div class="loading"> <p> <i></i> <i></i> <i></i> <i></i> <i></i> </p> </div>
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
*{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);} }

其实我想做的是加载进度条效果,但是假的进度条太烂,真的又没有特别好的办法,判断图片这种总感觉比较漏。

这是代码,有完美解决方案了解决。

复制代码
1
2
3
4
5
6
7
<script> document.onreadystatechange=function(){ if(document.readyState=='complete'){ $('.loading').fadeOut(); } } </script>

总结

以上所述是小编给大家介绍的HTML5等待加载动画效果,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

最后

以上就是痴情唇彩最近收集整理的关于HTML5等待加载动画效果的全部内容,更多相关HTML5等待加载动画效果内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(110)

评论列表共有 0 条评论

立即
投稿
返回
顶部