欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

實(shí)現(xiàn)局部遮罩與關(guān)閉原理及代碼

 更新時(shí)間:2013年02月04日 09:50:15   作者:  
實(shí)現(xiàn)局部遮罩,或許對某些朋友有著特殊的意義。局部遮罩的原理很簡單另外加上關(guān)閉就有著另一番的效果,本文將介紹實(shí)現(xiàn)方法,感興趣的朋友可以了解下,或許對你有所幫助
復(fù)制代碼 代碼如下:

//實(shí)現(xiàn)局部遮罩
<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>

相關(guān)文章

最新評論