DIV CSS遮罩层(弹窗窗口)
<!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>
最新文章
- 原生JS实现";旋转木马";效果的图片轮播插件
- 附录C 编译安装Hive
- js实现去重字符串
- 数据库知识整理<;七>;
- phonegap ios默认启动页
- IIS7/8 HTTP Error 500.19 错误 0x80070021
- linux下gdal的python包的安装
- href 里面 链接前面加/与不加的区别?(绝对路径与相对路径)
- __declspec(dllimport)的作用
- win32下利用python操作printer
- quick-cocos2d-x游戏开发【7】——scheduler 定时器
- 前端面试:谈谈 JS 垃圾回收机制
- iframe父页面获取子页面元素方法
- 解决adb:error: unknown host service
- 可遇不可求的Question之导入mysql中文乱码解决方法篇
- F - Communication System
- LCA的一些算法
- PostgreSQL索引页
- 【BZOJ】4560: [JLoi2016]字符串覆盖
- perl 内置操作符 $^O -判断操作系统环境