css遮罩代码

来源:互联网 发布:国外免费域名注册 编辑:程序博客网 时间:2024/04/29 08:40
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>css遮罩代码</title>
<script type="text/javascript" src="js/jquery.js"></script>
<style>
    .mask{
        background-color:rgb(0,0,0);
        display:none;
        opacity:0.7;    /* Safari, Opera */
        -moz-opacity:0.70;    /* FireFox */
        filter: alpha(opacity=70); /* IE */
        z-index:100;
        height:100%;
        width:100%;
        background-repeat:repeat;
        position:fixed;
        top:0px;
        left:0px;
    }
    
</style>
</head>

<body>
<div id = "mask" class = "mask"></div>
<script>
$("#mask").show();
</script>

</body>
</html>