JS实现遮罩层效果的简单实例_javascript技巧
程序员文章站
2022-05-28 11:36:25
...
复制代码 代码如下:
function show(){
var cover = document.getElementById("cover");
cover.style.width = document.documentElement.scrollWidth+"px";
cover.style.height = document.documentElement.scrollHeight+"px";
cover.style.display = "block";
}
#cover{
background:gray;
position:absolute;
left:0px;
top:0px;
display:none;
z-index:20;
filter:alpha(opacity=60);
opacity:0.6 !important;
}