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

后端 未结 17 1998
长情又很酷
长情又很酷 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:39

    Jonathon's excellent solution breaks in IE8 (the animation does not show at all). To fix this, change the CSS to:

    .modal {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 ) 
                url('http://i.stack.imgur.com/FhHRx.gif') 
                50% 50% 
                no-repeat;
    opacity: 0.80;
    -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity = 80);
    filter: alpha(opacity = 80)};
    

提交回复
热议问题