(网页)中的简单的遮罩层
html:
<div id="test"></div>
<div id="log_window">
<!--<a href="javascript:cancel_shield()">關閉</a>-->
<!--<img src="assets/css/images/loading.gif" />-->
<p style="font-size:25px;color:#FFFFFF;"><strong>正在加載,請稍等</strong></p>
</div>
<style>
html,body {
margin:0;
height:100%;
}
#test {
width:100%;
height:100%;
background-color:#000000;
position:absolute;
top:0;
left:0;
z-index:2;
opacity:0.3;
/*兼容IE8及以下版本瀏覽器*/
filter: alpha(opacity=80);
display:none;
}
#log_window {
width:300px;
height:200px;
margin: auto;
position: absolute;
z-index:3;
top: 10%;
bottom: 0;
left: 0;
right: 0;
display:none;
}
.ui-autocomplete{z-index:99999;}
</style>
遮罩層:
function shield(){
var s = document.getElementById("test");
s.style.display = "block";
var l = document.getElementById("log_window");
l.style.display = "block";
}
function cancel_shield(){
var s = document.getElementById("test");
s.style.display = "none";
var l = document.getElementById("log_window");
l.style.display = "none";
}
總結
以上是生活随笔為你收集整理的(网页)中的简单的遮罩层的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: css的优先级笔记
- 下一篇: 两天学会css基础(一)