<!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>

最新文章

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

热门文章

  1. AI步枪
  2. Java面向对象之回顾方法及加深
  3. docker、Containerd ctr、crictl 区别
  4. Mysql主从备份指定库别名
  5. 绕过登录的Cookie
  6. 将pyinstaller打包的exe文件制作成安装包
  7. 2、k8s 基础环境安装
  8. 【QT+MSVC2015】不安装VS2015,QT配置MSVC2015编译环境
  9. 使用ESP8266连接中文wifi
  10. Python自动发邮件(QQ为例)