效果图片如下:
演示地址可以看这里,这是将下面的代码美化过
打开http://www.noosee.com/html/2/n-2.html然后点查看下载地址
下面的代码可以自己保存为HTM文件然后打开,就可以看到了
整体实现效果代码:- <!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 type="text/css">
- <!--
- body{ margin:0 auto; text-align:center;}
- #downloading {
- position:fixed;
- width:400px;
- height:400px;
- z-index:2;
- background-color: #FFFFFF;
- visibility: hidden;
- top:50%; left:50%;
- margin:-200px -200px;
- border: 1px solid #CCCCCC;
- }
- #downloadingall {
- position:fixed;
- width:100%;
- height:100%;
- z-index:1;
- background-color: #000000;
- visibility: hidden;
- left: 0;
- top: 0;
- border: 1px solid #CCCCCC;
- filter:alpha(opacity=80);
- -moz-opacity:0.8;
- }
- -->
- </style>
- <script type="text/javascript">
- <!--
- function MM_showHideLayers() { //v9.0
- var i,p,v,obj,args=MM_showHideLayers.arguments;
- for (i=0; i<(args.length-2); i+=3)
- with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
- if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
- obj.visibility=v; }
- }
- //-->
- </script>
- </head>
- <body>
- <div>
- <input name="downloadurl" type="submit" id="mvdownloadinfo" onclick="MM_showHideLayers('downloadingall','','show');MM_showHideLayers('downloading','','show')" value="查看下载地址" />
- </div>
- 2342342342342
- <!--内部DIV -->
- <div id="downloading">
- <div id="close"><a href="#" onclick="MM_showHideLayers('downloadingall','','hide');MM_showHideLayers('downloading','','hide')">关闭</a></div>
- </div>
- <!--内部DIV结束 -->
- <!--外部背景DIV -->
- <div id="downloadingall"></div>
- <!--外部背景DIV结束 -->
- </body>
- </html>
复制代码
[ 本帖最后由 mingkong 于 2007-12-13 14:02 编辑 ] |