RSS
热门关键字:  虚拟主机技术  vps团购  discuz架构  虚拟主机团购  curl
当前位置 :| 团购首页>网站编程>CSS+DIV>

CSS用层覆盖整个页面

来源: 作者: 时间:2008-11-15 Tag: 点击:

<!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=gb2312" />

<title>用层覆盖整个页面</title>

<script language="javascript">

function test(){

        //弹出层

        document.getElementById("divWaiting").style.display="";

        //覆盖整个页面

        document.getElementById("divDisable").style.display = "";

    }

</script>

</head>

<body>

<%--我需要的覆盖整个页面的层--%>

<div id="MydivDisable" style="display: none; z-index:1; position: absolute;

     width:expression(document.body.offsetWidth); height:expression(document.body.offsetHeight);

     left: 0px; top: 0px;filter:alpha(opacity=50); background-color:White"> </div>

<%--我需要的弹出的层--%>

<div id="MydivWaiting" style="border:0px;display:none; z-index: 1100;">

  <table>

    <tr>

      <td>弹出来的层哦!</td>

    </tr>

  </table>

</div>

 

<%--源代码如下:--%>

 

<%--弹出DIV--%>

<div id="divWaiting" style="display: none; z-index: 1100; left: 25%; right: 25%; position: absolute;

    text-align: center; width: 50%; height: 50px; border-right: #009900 1px solid;

    border-top: #009900 1px solid; border-left: #009900 1px solid; border-bottom: #009900 1px solid;

    background-color: #f9fff6; left: expression((this.offsetParent.clientWidth/2)-(this.clientWidth/2)+this.offsetParent.scrollLeft);

    top: expression((this.offsetParent.clientHeight/2)-(this.clientHeight/2)+this.offsetParent.scrollTop);"> <br>

  The system is dealing with your request, please waiting </div>

 

<%--弄一个全屏的DIV来覆盖页面--%>

<div id="divDisable" style="display: none;width:expression(document.body.offsetWidth);height:expression(document.body.offsetHeight); z-index: 1000; position: absolute;left: 0px; top: 0px;filter:alpha(opacity=50); background-color:White"></div>

 

<input type="button" value="运行" name="test" id="test" onclick="test();"/>

</body>

</html>

 


 


    由于各种原因,我们无法获知[CSS用层覆盖整个页面]原创作者,如侵犯了您的版权,请您及时联系我们!
上一篇:CSS打造渐变统计柱形图
下一篇:没有了
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册