js遮罩效果

function ShowLoadingMaskLayer(text) {
    var htmlContent = '<div id=\"masklayer\">' +
        '<div id=\"covered\" style=\"position:fixed;_position:absolute;z-index:888;top:0px; left:0px;width:100%;height:100%;background-color:#696969;opacity:0.5;\">' +
        '</div>' +
        '<div id=\"poplayer\" style=\" position:absolute;top:46%;left:46%;width:130px; height:42px;z-index:8888; background-color:#ffffff;border:3px solid #95B8E7;\">' +
        '<img src=\"/Scripts/Projects/icons/ico_loading2.gif\" style="position:absolute;top:10px;left:10px;width:22px;height:22px;\"/>' +
        '<span style=\"position:absolute;top:15px;left:52px;\" id=\"masklayertext\">' + text + '...</span>' +
        '</div>' +
        '</div>';
    $("#masklayerDiv").html(htmlContent);
}

function CloseLoadingMaskLayer() {
    $("#masklayerDiv").html("");
}
View Code

 

posted @ 2015-11-24 12:56  潇潇与偕  阅读(258)  评论(0编辑  收藏  举报