一个简单的遮罩层

吃可爱长大的小学妹 提交于 2020-03-06 21:41:03

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
       <script type="text/javascript">
           function show() {
               document.getElementById("xie").style.display = "";
               document.getElementById("content1").style.display = "";
               document.getElementById("xie").style.filter = "Alpha(Opacity=30)";//透明度
               document.getElementById("xie").style.opacity = ".80";IE透明度
               //document.getElementById("content1").innerHTML = "你的内容<input onclick='hide()' type='button' value='确定'/>";
           }
           function hide() {
               document.getElementById("xie").style.display = "none";
               document.getElementById("content1").style.display = "none";
           }
    </script>
</head>
<body>
<div style="width:100%; background-color:#cccccc; display:none; height: 100%; position:fixed; left: 0; top: 0;" id="xie"></div>
<div style="width: 260px; display:none; height: 113px; position:absolute; left: 244px; top: 137px;" id="content1"></div>
<div id="fuck">
<input onClick="show()" type="button" value="显示"/>
</div>
</body>
</html>

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!