html5动画中关于等待加载动画的实例分享

发布时间:2022-05-17 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了html5动画中关于等待加载动画的实例分享脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
htML5动画中关于等待加载动画的实例分享

<div class="loading">
    
     <p>100<span></span></p></div>
*{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)}

    }

html5动画中关于等待加载动画的实例分享


<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);}

    }

html5动画中关于等待加载动画的实例分享

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

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

<script>
    
    document.onreadystatechange=function(){      
    if(document.readyState=='complete'){

         $('.loading').fadeOut();


      }


    }</script>

以上就是html5动画中关于等待加载动画的实例分享的详细内容,更多请关注脚本宝典其它相关文章

脚本宝典总结

以上是脚本宝典为你收集整理的html5动画中关于等待加载动画的实例分享全部内容,希望文章能够帮你解决html5动画中关于等待加载动画的实例分享所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签:h5html5html5