1:遮照层能遮住哪些div,是由z-index决定的。z-index能遮住比它值小的div
<div id="loadingBg" style="background-color:#cccccc;width:100%;height:750px;position:absolute;left:0px;top:0px;z-index:999;display:none; filter:alpha(opacity=50);/*:rgba(0,0,0,0.3);*/ opacity:0.57;"></div>
例:
<script>
function loading(){
$("#loadingBg").toggle();
$("#loading").toggle();
}
</script>
</head>
<body>
<div id="loadingBg" style="background-color: #cccccc; width: 100%; height: 750px; position: absolute; left: 0px; top: 0px; z-index: 999; display: none; filter: alpha(opacity = 50); /*:rgba(0,0,0,0.3);*/ opacity: 0.57;"></div>
<div id="loading" style="background-color: #cccccc; background: url('<%=basePath%>style/img/loading.gif') no-repeat; width: 100%; height: 750px; position: absolute; left: 500px; top: 300px; z-index: 999; display: none;">
<font color='red'>正中处理中,请稍后...</font>
</div>
<div class="main">
<div class="menu" style="background: url('<%=basePath%>skin/img/top_bg.gif') no-repeat; padding-top: 15px;">
<span>公告管理</span>
<ul>
<div id="loadingBg" style="background-color:#cccccc;width:100%;height:750px;position:absolute;left:0px;top:0px;z-index:999;display:none; filter:alpha(opacity=50);/*:rgba(0,0,0,0.3);*/ opacity:0.57;"></div>
例:
<script>
function loading(){
$("#loadingBg").toggle();
$("#loading").toggle();
}
</script>
</head>
<body>
<div id="loadingBg" style="background-color: #cccccc; width: 100%; height: 750px; position: absolute; left: 0px; top: 0px; z-index: 999; display: none; filter: alpha(opacity = 50); /*:rgba(0,0,0,0.3);*/ opacity: 0.57;"></div>
<div id="loading" style="background-color: #cccccc; background: url('<%=basePath%>style/img/loading.gif') no-repeat; width: 100%; height: 750px; position: absolute; left: 500px; top: 300px; z-index: 999; display: none;">
<font color='red'>正中处理中,请稍后...</font>
</div>
<div class="main">
<div class="menu" style="background: url('<%=basePath%>skin/img/top_bg.gif') no-repeat; padding-top: 15px;">
<span>公告管理</span>
<ul>