Mask遮罩层

1.html:

<div id="mask"></div>

2.css:

#mask {

width:100%;

height:100%;

background:#000;

opacity:0.5;

filter:alpha(opacity=50);

position:absolute;

left:0;

top:0;

}

3.js:

document.getElementById("mask").style.height = document.documentElement.scrollHeight+"px";

posted @ 2014-12-12 16:18  李酩轩  阅读(357)  评论(0)    收藏  举报