DDR爱好者之家 Design By 杰米
复制代码 代码如下:
//实现局部遮罩
<script type="text/javascript">
function Shade(){
var s = document.getElementById("shade");
s.style.display = "block";
}
function Display(){
var d = document.getElementById("shade");
d.style.display = "none";
}
</script>
<style type="text/css">
#box{
width:400px;
height:300px;
position:relative;
margin:0px auto;
border:1px solid #000;
}
#shade{
width:400px;
height:300px;
background-color:gray;
position:absolute;
z-index:999;
left:0px;
top:0px;
-moz-opacity:0.5;/*Firefox*/
opacity:0.5;/*Opera*/
filter:alpha(opacity=50); /*IE*/
}
</style>
</head>

<body>
<div id = "box">
<a href = "javascript:Shade()">局部遮罩</a>
<div id = "shade"></div>
</div>
<a href = "javascript:Display()">遮罩消失</a>
</body>
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米