DIV CSS遮罩层
来源:互联网 发布:淘宝宝贝卖点 编辑:程序博客网 时间:2024/05/02 12:35
<!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>
<title>DIV CSS遮罩层</title>
<script language="javascript" type="text/javascript">
function showdiv() {
document.getElementById("bg").style.display ="block";
document.getElementById("show").style.display ="block";
}
function hidediv() {
document.getElementById("bg").style.display ='none';
document.getElementById("show").style.display ='none';
}
</script>
<style type="text/css">
#bg{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.7; opacity:.70; filter: alpha(opacity=70);}
#show{display: none; position: absolute; top: 25%; left: 22%; width: 53%; height: 49%; padding: 8px; border: 8px solid #E8E9F7; background-color: white; z-index:1002; overflow: auto;}
</style>
</head>
<body>
<input id="btnshow" type="button" value="Show" onclick="showdiv();"/>
<div id="bg"></div>
<div id="show">测试
<input id="btnclose" type="button" value="Close" onclick="hidediv();"/>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DIV CSS遮罩层</title>
<script language="javascript" type="text/javascript">
function showdiv() {
document.getElementById("bg").style.display ="block";
document.getElementById("show").style.display ="block";
}
function hidediv() {
document.getElementById("bg").style.display ='none';
document.getElementById("show").style.display ='none';
}
</script>
<style type="text/css">
#bg{ display: none; position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index:1001; -moz-opacity: 0.7; opacity:.70; filter: alpha(opacity=70);}
#show{display: none; position: absolute; top: 25%; left: 22%; width: 53%; height: 49%; padding: 8px; border: 8px solid #E8E9F7; background-color: white; z-index:1002; overflow: auto;}
</style>
</head>
<body>
<input id="btnshow" type="button" value="Show" onclick="showdiv();"/>
<div id="bg"></div>
<div id="show">测试
<input id="btnclose" type="button" value="Close" onclick="hidediv();"/>
</div>
</body>
</html>
0 0
- DIV CSS遮罩层
- DIV CSS遮罩层
- DIV CSS遮罩层
- DIV CSS遮罩层
- DIV CSS遮罩层
- DIV CSS遮罩层
- 遮罩层DIV+CSS
- div css
- div+css
- div+css
- div+css
- div+css
- DIV+CSS
- CSS+DIV
- DIV+CSS
- css+div
- css div
- div+css
- 代码合集
- 查看SQL Profiler
- redhat 下卸载安装mysql
- MIT 18.06 ODE video note(part I)
- Java多线程实现源码分析
- DIV CSS遮罩层
- 表决心2333333
- js 正则表达式”直接语法“和”对象语法“对比
- onPrepareOptionsMenu 和onCreateOptionsMenu 的区别
- 高并发量网站解决方案
- java中的static和final关键字(讲解很详细)
- SQL常用语句查询
- 粒子系统
- truncate函数和ftruncate修改文件大小-linux