Home >Web Front-end >JS Tutorial >A simple example of JS implementation of mask layer effect_javascript skills

A simple example of JS implementation of mask layer effect_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:15:471091browse

复制代码 代码如下:

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;

    }

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn