求助:注册页面效果如何达成 目前有很多网站,在注册或发送信息时,会在屏幕正中弹出一个div窗口,这时候后面的网页就成灰色,而且不能操作了,请问这个效果是如何做出来的呢?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title><style>#overlay{position:fixed;top:0;left:0;width:100%;height:100%; background:#000;opacity:0.5;filter:alpha(opacity=50);z-index:10;display:none}</style></head><body><div id="overlay" style="display:none"></div><input type="button" value="click me" id="c" /><script> document.getElementById('c').onclick = function(){ document.getElementById('overlay').style.display = 'block'; };</script></body></html>用个div层就行了 那个所谓的层 就是个div就是了 写了个小例子 就是这么个效果<html> <head> <title>层</title> <style type="text/css">.el-mask { z-index: 20000; position: absolute; top: 0; left: 0; -moz-opacity: 0.5; opacity: .50; filter: alpha(opacity = 50); background-color: #CCC; width: 100%; height: 100%; zoom: 1;}</style> <script type="text/javascript"> </script> </head> <body> <div> <input type="text" id="dd" name="ddd"> </div> <div id="ddd" class="el-mask" style="display: block; z-index: 8000; width: 1152px; height: 580px;" /> <div> <br> <br> <br> <input type="text" id="ddddd" name="ddddd"> </div> </div> </body></html> js点击切换样式 如何计算一个元素距离body顶部的距离 【OpenAPI】发一个自己写的沙盒 jquery onmouseout问题 数米网首页每日净值的这个载入功能如何实现? 如何用javascript取一个表单的信息 问一个关于函数的概念性的问题 ----如何控制select在失去焦点时不显示----- 怎样才能实现 关闭浏览器时调用 script, 但在刷洗时不调用. 如何用JSP得到当前浏览器窗口的大小?在线等待ing..... 使用jquery easyUI1.2.3中的tree时遇到的数据加载的奇怪问题 JavaScript中的$符号
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
#overlay{position:fixed;top:0;left:0;width:100%;height:100%; background:#000;opacity:0.5;filter:alpha(opacity=50);z-index:10;display:none}
</style>
</head>
<body>
<div id="overlay" style="display:none"></div>
<input type="button" value="click me" id="c" />
<script>
document.getElementById('c').onclick = function(){
document.getElementById('overlay').style.display = 'block';
};
</script>
</body>
</html>用个div层就行了
<html>
<head>
<title>层</title>
<style type="text/css">
.el-mask {
z-index: 20000;
position: absolute;
top: 0;
left: 0;
-moz-opacity: 0.5;
opacity: .50;
filter: alpha(opacity = 50);
background-color: #CCC;
width: 100%;
height: 100%;
zoom: 1;
}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div>
<input type="text" id="dd" name="ddd">
</div>
<div id="ddd" class="el-mask"
style="display: block; z-index: 8000; width: 1152px; height: 580px;" />
<div>
<br>
<br>
<br>
<input type="text" id="ddddd" name="ddddd">
</div>
</div>
</body>
</html>