<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>遮盖层</title>
<style>
/* 登录层 */
#choose{
display:none;
width:360px;
height:230px;
background:#69F;
position:absolute;
top:%;
left:%;
z-index:;
opacity:0.8; /*背景的透明度:(Firefox适用;)*/
filter:alpha(opacity =); /*背景的透明度:(IE适用);*/
} /*遮罩层*/
#mid{
display:none;
width:%;
height:%;
background:#;
position:absolute;
top:;
left:;
z-index:;
opacity:0.4; /*背景的透明度:(Firefox适用;)*/
filter:alpha(opacity =); /*背景的透明度:(IE适用);
}
</style>
</head>
<body>
<a href="#" class="click">点击按钮</a>
<!--填充内容开始 往body里面写点内容,因为遮盖层要通过body去获取界面的高宽度,从而body的高宽同时决定了遮盖层的高宽。但是码友们在平时运用这个demo的时候,由于所写body的代码肯定是有的,而且是比较多的,所以一定要忽略我下面填充的内容->
1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br />
1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />1<br />1<br /> 1<br /> 1<br /> 1<br /> 1<br />1<br />
<!-- 填充内容结束 -->
<!-- 表单层 -->
<div id="choose"> <!-- 表单头部 -->
<a class=close>关闭</a>
<table>
<tr>
<td colspan="3" class="td">
</td>
</tr>
<tr>
<td class="td1">登录名:</td>
<td class="td2"><input type="text"/></td>
<td class="td3">*</td>
</tr>
<tr>
<td class="td1">密&nbsp;码:</td>
<td class="td2"><input type="password"/></td>
<td class="td3">*</td>
</tr>
<tr>
<td class="td1">验证码:</td>
<td class="td2"><input type="text"/></td>
<td class="td3">*</td>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" value="登陆"/></td>
</tr>
</table>
</div> <!-- 遮盖层 -->
<div id="mid"></div>
</body>
<script type="text/javascript" src="js/jquery-1.11.2.min.js" ></script>
<script>
$(function(){
$(".click").click(function(){
var bh = $("body").height(); //获取当前浏览器界面的高度
var bw = $("body").width(); //获取当前浏览器界面的宽度
$("#mid").css({
height:bh, //给遮盖层的div的高宽度赋值
width:bw,
display:"block" //遮盖层显示
});
$("#choose").show();
});
$(".close").click(function(){
$("#choose").hide();
$("#mid").hide();
});
});
</script>
</html>

最新文章

  1. jQuery插件中文乱码解决办法
  2. Session与cookie的区别?
  3. WIN7 java7 环境变量配置
  4. SQL Server 性能优化之——T-SQL NOT IN 和 NOT Exists
  5. Linux 实现自动安装服务组件以及优化内核参数 (转)
  6. poj 1986 Distance Queries
  7. asp.net mvc4 使用KindEditor文本编辑器
  8. ABP+AdminLTE+Bootstrap Table权限管理系统第五节--WBEAPI及SwaggerUI
  9. pc端手機端自適應佈局方案
  10. 缓存系列之二:CDN与其他层面缓存
  11. U32592 摘果实
  12. LInux系统木马植入排查分析 及 应用漏洞修复配置(隐藏bannner版本等)
  13. ASP.NET MVC中有四种过滤器类型
  14. HDOJ 2008 数值统计
  15. hdu1102(最小生成树水题)
  16. C++ template —— 智能指针(十二)
  17. mybatis项目启动报错 The content of element type &quot;resultMap&quot; must match &quot;(constructor?,id*,result*,association*,collection*,discriminator?)&quot;.
  18. linux command curl and sha256sum implement download verification package
  19. tf.unstack\tf.unstack
  20. 使用CXF实现基于Rest方式的WebService

热门文章

  1. The Linux Mint 17.1:Eclipse Run The C++ And Python Configoration
  2. [bzoj4540][Hnoi2016][序列] (莫队算法+单调栈+st表)
  3. js学习笔记1
  4. [JS]省市区数据及方法调用
  5. zabbix 布署实践【2 agent安装】
  6. CentOS7 下安装telnet服务
  7. CodeForces 645D Robot Rapping Results Report
  8. HDU 5895 Mathematician QSC
  9. Android使用Eclipse遇到&quot;java.lang.ClassNotFoundException&quot;
  10. 【bootstrap】时间选择器datetimepicker和daterangepicker