How can I create a “Please Wait, Loading…” animation using jQuery?

后端 未结 17 2182
长情又很酷
长情又很酷 2020-11-22 00:07

I would like to place a \"please wait, loading\" spinning circle animation on my site. How should I accomplish this using jQuery?

17条回答
  •  醉梦人生
    2020-11-22 00:47

    It is very simple.

    HTML

    
    
    
    
      
    Please Wait, Loading…

    Dom Loaded

    CSS

    #cover {
      position: fixed;
      height: 100%;
      width: 100%;
      top: 0;
      left: 0;
      background: #141526;
      z-index: 9999;
      font-size: 65px;
      text-align: center;
      padding-top: 200px;
      color: #fff;
      font-family:tahoma;
    }
    

    JS - JQuery

    $(window).on('load', function () {
      $("#cover").fadeOut(1750);
    });
    

提交回复
热议问题