首页 > 其他 > 详细

页面用一个遮罩层显示加载,加载完后隐藏该div

时间:2019-01-05 23:18:08      阅读:418      评论:0      收藏:0      [点我收藏+]
<div id="background" class="background" style="display: none; "></div>
<div id="progressBar" class="progressBar" style="display: none; "><img src="/content/5-121204194109.gif"></div>   
.progressBar {
        display: block;
        width: 65px;
        height: 65px;
        top: 50%;
        left: 50%;
        margin-left: -74px;
        margin-top: -14px;
        padding: 10px;
        text-align: left;
        line-height: 27px;
        font-weight: bold;
        position: fixed;
        z-index: 2001;
    }

    .background {
        display: block;
        width: 100%;
        height: 100%;
        opacity: 0.4;
        filter: alpha(opacity=40);
        background: white;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 2000;
        background-color: #666666;
    }   
 var ajaxbg = $("#background, #progressBar");
        ajaxbg.hide();
        $(document).ajaxStart(function () {
            ajaxbg.show();
        }).ajaxStop(function () {
            ajaxbg.hide();
        });

 

页面用一个遮罩层显示加载,加载完后隐藏该div

原文:https://www.cnblogs.com/lunawzh/p/10226682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!