Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[分享] 送上教程......希望大家能编辑出更好的风格!

[复制链接]
kuaise 发表于 2007-6-26 22:52:37 | 显示全部楼层
精华~~~~~~~~~~~`
回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 22:53:26 | 显示全部楼层

中英文双语导航菜单(代码)

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="Keywords" content="bilingual menu,中英文双语菜单" />
  6. <meta http-equiv="Description" content="完全用CSS实现的中英文双语导航菜单" />
  7. <meta content="all" name="robots" />
  8. <meta name="author" content="forestgan" />
  9. <meta name="copyright" content="http://www.forest53.com" />
  10. <title>完全用CSS实现的中英文双语导航菜单</title>
  11. <style type="text/css">
  12. a{
  13.         color: #FFFF99;
  14.         text-decoration: none;
  15. }

  16. a:hover{
  17.         color: #FFFFFF;
  18.         text-decoration: underline;
  19. }
  20.           
  21. #nav{
  22.         padding: 10px 10px 0;
  23.         font-size: 12px;
  24.         font-weight: bold;
  25.         margin: 1em 0 0;
  26.         list-style:none;
  27. }

  28. #nav li{
  29.         float: left;
  30.         margin-right: 1px;
  31. }

  32. .bi{
  33.         position: relative;
  34.         z-index: 0;
  35. }

  36. .bi:hover{
  37.         z-index: 99;
  38. }

  39. .bi:hover span{
  40.         visibility: visible;
  41.         top: 0;
  42.         left: 0;
  43.         cursor: pointer;
  44. }

  45. .bi span{
  46.         position: absolute;
  47.         left: -999em;
  48.         visibility: hidden;
  49. }

  50. #nav li a,.bi:hover span{
  51.         line-height: 20px;
  52.         text-decoration: none;
  53.         background: #DDDDDD;
  54.         color: #666666;
  55.         display: block;
  56.         width: 80px;
  57.         text-align: center;
  58. }

  59. #nav li a:hover,.bi:hover span{
  60.         color: #FFFFFF;
  61.         background: #DC4E1B;
  62. }

  63. .bi:hover span{
  64.         padding-top: 2px;
  65. }

  66. #navbar{
  67.         background: #DC4E1B;
  68.         height: 8px;
  69.         overflow: hidden;
  70.         clear: both;
  71. }

  72. </style>
  73. <link href="../css/main.css" rel="stylesheet" type="text/css" />
  74. </head>
  75. <body>
  76. <div id="top">
  77.   <ul id="nav">
  78.                 <li><a class="bi" href="index.html">Home<span>首 页</span></a></li>
  79.                 <li><a class="bi" href="about.html">About us<span>关于我们</span></a></li>
  80.                 <li><a class="bi" href="products.html">Products<span>产品展示</span></a></li>
  81.                 <li><a class="bi" href="services.html">Services<span>售后服务</span></a></li>
  82.                 <li><a class="bi" href="contact.html">Contact<span>联系我们</span></a></li>
  83.         </ul>
  84.         <div id="navbar"></div>

  85. </body>
  86. </html>
复制代码
回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 22:56:36 | 显示全部楼层
妈的,DZ为什么不做个图片浏览功能,害我上传图片老是发错~(我朋友在那气的发直,嘀咕嘀咕的骂)

现在我来修改下dz论坛上传图片的效果:

  1. <script>
  2. function yulan()
  3. {
  4. var fileext=document.form1.UpFile.value.substring(document.form1.UpFile.value.lastIndexOf("."),document.form1.UpFile.value.length)
  5.         fileext=fileext.toLowerCase()
  6.    
  7.         if ((fileext!='.jpg')&&(fileext!='.gif')&&(fileext!='.jpeg')&&(fileext!='.png')&&(fileext!='.bmp'))
  8.         {
  9.             alert("对不起,系统仅支持标准格式的照片,请您调整格式后重新上传,谢谢 !");
  10.              document.form1.UpFile.focus();
  11.         }
  12.         else
  13.         {
  14.         //alert(''+document.form1.UpFile.value)//把这里改成预览图片的语句
  15.                 document.getElementById("preview").innerHTML="<img src='"+document.form1.UpFile.value+"' style='border:6px double #ccc';padding:5px;>"
  16.         }

  17.        
  18. }
  19. </script>

  20. <form name="form1" method="POST" enctype="multipart/form-data">
  21. <input type="file" name="UpFile" size="46" onchange="yulan()">

  22. <div id="preview"></div>

  23. </form>
复制代码


呵呵~具体设置大小自己定!
回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 23:03:49 | 显示全部楼层

最后一个教程!

如何拖动层,并且还带关闭和带开功能!同时配合网页的完美性:

可移动的显示层:

  1. <html>
  2. <head>
  3. <title>可移动的显示层</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. </head>
  6. <body   bgcolor=#FFFFFF  >
  7. <!-------------------------------->
  8. <style>
  9. <!--

  10. /*Post-it note script- by Wsabstract.com
  11. Visit Website Abstraction ([url]http://jojoo.net[/url]) for script
  12. Credit must stay intact for use*/

  13. #postit{
  14. position:absolute;
  15. width:250;
  16. padding:5px;
  17. background-color:lightyellow;
  18. border:1px solid black;
  19. visibility:hidden;
  20. z-index:100;
  21. cursor:hand;
  22. }

  23. -->
  24. </style>
  25. <div id="postit" style="left:150px;top:150px">
  26. <div align="right"><b><a href="javascript:closeit()">[关闭]</a></b></div>

  27. <b>jojoo.net:</b><br>
  28. <p><font size="2" face="Arial"><a href="http://www.jojoo.net" target="_new">经典实例、教程库<br>
  29. </a>汇聚网界最多的网页特效之家@!</font></p>
  30. </div>

  31. <script>

  32. //Post-it only once per browser session? (0=no, 1=yes)
  33. //Specifying 0 will cause postit to display every time page is loaded
  34. var once_per_browser=0

  35. ///No need to edit beyond here///

  36. var ns4=document.layers
  37. var ie4=document.all
  38. var ns6=document.getElementById&&!document.all

  39. if (ns4)
  40. crossobj=document.layers.postit
  41. else if (ie4||ns6)
  42. crossobj=ns6? document.getElementById("postit") : document.all.postit


  43. function closeit(){
  44. if (ie4||ns6)
  45. crossobj.style.visibility="hidden"
  46. else if (ns4)
  47. crossobj.visibility="hide"
  48. }

  49. function get_cookie4(Name) {
  50.   var search = Name + "="
  51.   var returnvalue = "";
  52.   if (document.cookie4.length > 0) {
  53.     offset = document.cookie4.indexOf(search)
  54.     if (offset != -1) { // if cookie4 exists
  55.       offset += search.length
  56.       // set index of beginning of value
  57.       end = document.cookie4.indexOf(";", offset);
  58.       // set index of end of cookie4 value
  59.       if (end == -1)
  60.          end = document.cookie4.length;
  61.       returnvalue=unescape(document.cookie4.substring(offset, end))
  62.       }
  63.    }
  64.   return returnvalue;
  65. }

  66. function showornot(){
  67. if (get_cookie4('postdisplay')==''){
  68. showit()
  69. document.cookie4="postdisplay=yes"
  70. }
  71. }

  72. function showit(){
  73. if (ie4||ns6)
  74. crossobj.style.visibility="visible"
  75. else if (ns4)
  76. crossobj.visibility="show"
  77. }

  78. if (once_per_browser)
  79. showornot()
  80. else
  81. showit()

  82. </script>

  83. <script language="JavaScript1.2">

  84. //drag drop function for ie4+ and NS6////
  85. /////////////////////////////////

  86. function drag_drop(e){
  87. if (ie4&&dragapproved){
  88. crossobj.style.left=tempx+event.clientX-offsetx
  89. crossobj.style.top=tempy+event.clientY-offsety
  90. return false
  91. }
  92. else if (ns6&&dragapproved){
  93. crossobj.style.left=tempx+e.clientX-offsetx
  94. crossobj.style.top=tempy+e.clientY-offsety
  95. return false
  96. }
  97. }

  98. function initializedrag(e){
  99. if (ie4&&event.srcElement.id=="postit"||ns6&&e.target.id=="postit"){
  100. offsetx=ie4? event.clientX : e.clientX
  101. offsety=ie4? event.clientY : e.clientY

  102. tempx=parseInt(crossobj.style.left)
  103. tempy=parseInt(crossobj.style.top)

  104. dragapproved=true
  105. document.onmousemove=drag_drop
  106. }
  107. }
  108. document.onmousedown=initializedrag
  109. document.onmouseup=new Function("dragapproved=false")

  110. </script>
  111. <!---------------------------------->
  112. </body>
  113. </html>
复制代码



隐藏层的打开和关闭

  1. <html>
  2. <head>
  3. <title>隐藏层的打开关闭</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  5. </head>
  6. <body   bgcolor=#FFFFFF  >
  7. <!-------------------------------->
  8. <script language=javascript>
  9. ie4=(document.all)?true:false;
  10. ns4=(document.layers)?true:false;

  11. function toExit(){
  12. var args=toExit.arguments;
  13. var visible=args[0];
  14. if(ns4){
  15.         theObj=eval("document.layers[\'"+args[1]+"\']");
  16.         if(theObj)theObj.visibility=visible;
  17.         }
  18. else if(ie4){
  19.         if(visible=='show')visible='visible';
  20.         if(visible=='hide')visible='hidden';
  21.         theObj=eval("document.all[\'"+args[1]+"\']");
  22.         if(theObj)theObj.style.visibility=visible;
  23.         }

  24. }     

  25. </script>
  26. <div id=boysoft
  27. style="HEIGHT: 80px; LEFT: 309px; POSITION: absolute; TOP: 150px; VISIBILITY: hidden; WIDTH: 180px; Z-INDEX: 1">
  28. <table bgcolor=#356f66 border=1 cellpadding=0 cellspacing=0 height=80
  29.   width=180>
  30.   <tbody>
  31.                       <tr>
  32.                         <td height=65 width="100%">
  33.                           <table border=0 cellpadding=0 cellspacing=0 height=80 width="99%">
  34.                             <tbody>
  35.                             <tr>
  36.                               <td height=57> <font
  37.             color=#ffffff>你看,这是一个隐藏的层,不过现在你可以看到了。<b></b></font></td>
  38.                             </tr>
  39.                             <tr align="center">
  40.                               <td height=23 width="100%"><a
  41.             href="javascript:toExit('hide','boysoft')"><font color=white>关闭此窗口</font></a></td>
  42.                             </tr>
  43.                             </tbody>
  44.                           </table>
  45.                         </td>
  46.                       </tr>
  47.                       </tbody>
  48.                     </table>
  49.                   </div>
  50. <a href="javascript:toExit('show','boysoft')"><font color="#0000FF">打开隐藏层</font></a>

  51. <!---------------------------------->
  52. </body>
  53. </html>
复制代码


XHTML标准下的Tab效果

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=gbk">
  5. <style>
  6. body{font-size:12px;}
  7. a{color:#000;text-decoration:none;}
  8. .on{float:left;width:100px;line-height:20px;color:#FFFFFF;background:#4874D0;border:#2B5CC5 1px solid;border-bottom:none;text-align:center;}
  9. .off{float:left;width:100px;line-height:20px;border-bottom:#2B5CC5 1px solid;cursor:pointer;text-align:center;}
  10. .tab{width:303px;margin:auto;}
  11. .box{width:290px;margin:auto;border:#2B5CC5 1px solid;border-top:none;line-height:20px;padding:5px;}
  12. </style>
  13. <title>Tab - From [url]http://master8.net/bbs/[/url]</title>
  14. <body>
  15. <div class="tab">
  16. <div class="off" id="Tab_1" onclick="showTab('1');">Tab 1</div>
  17. <div class="on" id="Tab_2" onclick="showTab('2');">Tab 2</div>
  18. <div class="off" id="Tab_3" onclick="showTab('3');">Tab 3</div>
  19. </div>
  20. <div style="clear:both;"></div>
  21. <div class="box" id="cont_1" style="display:none;">
  22. <a href="http://www.2ky.cn/" target="_blank">
  23. This is Tab 1's content<br/>
  24. [url]www.2ky.cn[/url]</a>
  25. </div>
  26. <div class="box" id="cont_2" style="">
  27. <a href="http://www.2ky.cn/" target="_blank">
  28. This is Tab 2's content<br/>
  29. [url]www.2ky.cn[/url]</a>
  30. </div>
  31. <div class="box" id="cont_3" style="display:none;">
  32. <a href="http://www.2ky.cn/" target="_blank">
  33. This is Tab 3's content<br/>
  34. [url]www.2ky.cn[/url]</a>
  35. </div>
  36. <script type="text/javascript">
  37. function showTab(ID)
  38. {
  39.     for(var i=1;i<=3;i++)
  40.     {
  41.         if(ID==i)
  42.         {
  43.             $('Tab_'+i).className='on';
  44.             $('cont_'+i).style.display='';
  45.         }
  46.         else
  47.         {
  48.             $('Tab_'+i).className='off';
  49.             $('cont_'+i).style.display='none';
  50.         }
  51.     }
  52. }
  53. function $(ID)
  54. {
  55.     return document.getElementById(ID);
  56. }
  57. </script>
  58. </body>
  59. </html>
复制代码




单击控制展开和关闭的层


  1. <style>
  2. #content,#intro{
  3.         font: 13px/25px;
  4.         width: 200px;
  5.         height: 40px;
  6.         background: #eee;
  7.         padding: 10px;
  8.         border: 4px #ccc double;
  9.         border-bottom:0;
  10.         overflow: hidden;
  11. }

  12. #intro {
  13.         color: #036;
  14.         font:12px;
  15.         border: 4px #ccc double;
  16.         border-top:0;
  17.         height:70px;
  18. }
  19. #key{color:#900;float:right}
  20. hr{height:1px;border:1px #ccc dotted}
  21. </style>
  22. <script>
  23. var s=5;
  24. var minheight=40;
  25. var maxheight=500;
  26. function shoppingcat(){
  27.         var key = document.getElementById("key").innerText;
  28.         if(key=="展开"){
  29.                 content.style.pixelHeight+=s;
  30.                 if(content.style.pixelHeight<maxheight){
  31.                         setTimeout("shoppingcat();",1);
  32.                 }else{
  33.                         document.getElementById("key").innerText="关闭";
  34.                 }
  35.         }else{
  36.                 content.style.pixelHeight-=s;
  37.                 if(content.style.pixelHeight>minheight){
  38.                         setTimeout("shoppingcat();",1);
  39.                 }else{
  40.                         document.getElementById("key").innerText="展开";
  41.                 }
  42.         }
  43. }
  44. </script>
  45. <div id="content">
  46. 孤雁儿
  47. <br><br>
  48. 世人作梅词,下笔便俗。予试作一篇,乃知前言不妄耳。<br><br>
  49. 藤床纸帐朝眠起,<br>
  50. 说不尽、无佳思。<br>
  51. 沈香烟断玉炉寒,<br>
  52. 伴我情怀如水。<br>
  53. 笛声三弄,<br>
  54. 梅心惊破,<br>
  55. 多少春情意。<br><br>

  56. 小风疏雨萧萧地,<br>
  57. 又催下、千行泪。<br>
  58. 吹箫人去玉楼空,<br>
  59. 肠断与谁同倚?
  60. 一枝折得,<br>
  61. 人间天上,<br>
  62. 没个人堪寄。
  63. </div>

  64. <div id="intro" ><hr>作者:李清照<span id="key" onclick="shoppingcat();">展开</span><br>来源

  65. :中国诗辞网</div>
复制代码



纯CSS代码翻页效果

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
  3. <head profile="http://www.w3.org/2000/08/w3c-synd/#">
  4. <meta http-equiv="content-language" content="zh-cn" />
  5. <meta http-equiv="content-type" content="text/html;charset=gb2312" />

  6. <style>

  7. dl {
  8.         position:absolute;
  9.         width:240px;
  10.         height:170px;
  11.         border:10px solid #eee;
  12.         }
  13. dd {
  14.         margin:0;
  15.         width:240px;
  16.         height:170px;
  17.         overflow:hidden;
  18.         }
  19. dt {
  20.         position:absolute;
  21.         right:1px;
  22.         }

  23. ul {
  24.         margin:0;
  25.         padding:0;
  26.         width:260px;
  27.         height:170px;
  28.         list-style:none;
  29.         background:url("http://www.2ky.cn/js/jsneedpic/arrowb_kJrcZheJmiIF.gif") no-repeat 75% 20px;
  30.         border:1px solid #ccc
  31.         }
  32. #b {
  33.         background-position:75% center
  34.         }
  35. #c {
  36.         background-position:75% 86%
  37.         }
  38. li {
  39.         width:205px;
  40.         height:27px;
  41.         font:12px/27px "宋体",sans-serif;
  42.         white-space:nowrap;
  43.         overflow:hidden;
  44.         }
  45. dt a {
  46.         display:block;
  47.         margin:1px;
  48.         width:30px;
  49.         height:56px;
  50.         text-align:center;
  51.         font:700 12px/55px "宋体",sans-serif;
  52.         color:#fff;
  53.         text-decoration:none;
  54.         background:#666;
  55.         }
  56. dt a:hover {
  57.         background:orange
  58.         }
  59. </style>
  60. <head/>
  61. <body>
  62. <dl>
  63. <dt><a href="#a" title="">新闻</a><a href="#b" title="">娱乐</a><a href="#c" title="">体育</a></dt>
  64. <dd>



  65. <ul id="a">
  66.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  67.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  68.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  69.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  70.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  71.         <li>·<a href="" title="">国际新闻国际新闻国际新闻</a></li>
  72. </ul>

  73. <ul id="b">
  74.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  75.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  76.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  77.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  78.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  79.         <li>·<a href="" title="">娱乐新闻娱乐新闻娱乐新闻</a></li>
  80. </ul>

  81. <ul id="c">
  82.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  83.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  84.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  85.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  86.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  87.         <li>·<a href="" title="">体育新闻体育新闻体育新闻</a></li>
  88. </ul>
  89. </dd>
  90. </dl>
  91. </body>
  92. </html>
复制代码


纯CSS代码翻页效果

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
  3. <head profile="http://www.w3.org/2000/08/w3c-synd/#">
  4. <meta http-equiv="content-language" content="zh-cn" />
  5. <meta http-equiv="content-type" content="text/html;charset=gb2312" />

  6. <style>

  7. dl {
  8.         position:absolute;
  9.         width:240px;
  10.         height:170px;
  11.         border:10px solid #eee;
  12.         }
  13. dd {
  14.         margin:0;
  15.         width:240px;
  16.         height:170px;
  17.         overflow:hidden;
  18.         }
  19. img {
  20.         border:1px solid black
  21.         }
  22. dt {
  23.         position:absolute;
  24.         right:3px;
  25.         top:50px;
  26.         }
  27. a {
  28.         display:block;
  29.         margin:1px;
  30.         width:20px;
  31.         height:20px;
  32.         text-align:center;
  33.         font:700 12px/20px "宋体",sans-serif;
  34.         color:#fff;
  35.         text-decoration:none;
  36.         background:#666;
  37.         border:1px solid #fff;
  38.         filter:alpha(opacity=40);
  39.         opacity:.4;
  40.         }
  41. a:hover {
  42.         background:#000
  43.         }
  44. </style>
  45. </head>
  46. <body>
  47. <dl>
  48. <dt><a href="#a" title="">1</a><a href="#b" title="">2</a><a href="#c" title="">3</a></dt>
  49. <dd>
  50. <img src="http://www.2ky.cn/js/jsneedpic/1stpic.jpg" alt="" title="" id="a" />
  51. <img src="http://www.2ky.cn/js/jsneedpic/2stpic.jpg" alt="" title="" id="b" />
  52. <img src="http://www.2ky.cn/js/jsneedpic/3stpic.jpg" alt="" title="" id="c" />
  53. </dd>
  54. </dl>
  55. </body>
  56. </html>
复制代码
回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 23:06:07 | 显示全部楼层
和大家说再见了!

走之前送上一个特效!

带阴影的可拖动的浮动层

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>MyPixbot</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <script language="JavaScript" type="text/JavaScript">
  7. <!--
  8. function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  9.   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  10.     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  11.   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
  12. }
  13. MM_reloadPage(true);

  14. function MM_findObj(n, d) { //v4.01
  15.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  16.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  17.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  18.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  19.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  20. }

  21. function MM_showHideLayers() { //v6.0
  22.   var i,p,v,obj,args=MM_showHideLayers.arguments;
  23.   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  24.     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
  25.     obj.visibility=v; }
  26. }

  27. function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
  28.   //Copyright 1998 Macromedia, Inc. All rights reserved.
  29.   var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
  30.   var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
  31.   retVal = true; if(IE && event) event.returnValue = true;
  32.   if (MM_dragLayer.arguments.length > 1) {
  33.     curDrag = MM_findObj(objName); if (!curDrag) return false;
  34.     if (!document.allLayers) { document.allLayers = new Array();
  35.       with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
  36.         for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
  37.           with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
  38.       } else {
  39.         if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div");
  40.           for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
  41.         for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];
  42.     } }
  43.     curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
  44.     curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
  45.     curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
  46.     curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
  47.     curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
  48.     curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
  49.     curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
  50.     if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
  51.     curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
  52.     if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
  53.     curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
  54.     curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
  55.     curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
  56.     document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
  57.     if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  58.   } else {
  59.     var theEvent = ((NS)?objName.type:event.type);
  60.     if (theEvent == 'mousedown') {
  61.       var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
  62.       var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
  63.       var maxDragZ=null; document.MM_maxZ = 0;
  64.       for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
  65.         var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
  66.         if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
  67.         var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
  68.         if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
  69.           var parentL=0; var parentT=0;
  70.           if (NS6) { parentLayer = aLayer.parentNode;
  71.             while (parentLayer != null && parentLayer.style.position) {            
  72.               parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
  73.               parentLayer = parentLayer.parentNode;
  74.           } } else if (IE) { parentLayer = aLayer.parentElement;      
  75.             while (parentLayer != null && parentLayer.style.position) {
  76.               parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
  77.               parentLayer = parentLayer.parentElement; } }
  78.           var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
  79.           var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
  80.           if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
  81.           var tmpW = MM_hWidth;  if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
  82.           var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
  83.           if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
  84.               || maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
  85.       if (curDrag) {
  86.         document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
  87.         curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
  88.         curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
  89.         if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
  90.         MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
  91.         document.MM_curDrag = curDrag;  curDrag.MM_SNAPPED=false;
  92.         if(curDrag.MM_toFront) {
  93.           eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
  94.           if (!curDrag.MM_dropBack) document.MM_maxZ++; }
  95.         retVal = false; if(!NS4&&!NS6) event.returnValue = false;
  96.     } } else if (theEvent == 'mousemove') {
  97.       if (document.MM_curDrag) with (document.MM_curDrag) {
  98.         var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
  99.         var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
  100.         newLeft = mouseX-MM_oldX; newTop  = mouseY-MM_oldY;
  101.         if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
  102.         if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
  103.         if (MM_bT!=null) newTop  = Math.max(newTop ,MM_bT);
  104.         if (MM_bB!=null) newTop  = Math.min(newTop ,MM_bB);
  105.         MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
  106.         if (NS4) {left = newLeft; top = newTop;}
  107.         else if (NS6){style.left = newLeft; style.top = newTop;}
  108.         else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
  109.         if (MM_dragJS) eval(MM_dragJS);
  110.         retVal = false; if(!NS) event.returnValue = false;
  111.     } } else if (theEvent == 'mouseup') {
  112.       document.onmousemove = null;
  113.       if (NS) document.releaseEvents(Event.MOUSEMOVE);
  114.       if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
  115.       if (document.MM_curDrag) with (document.MM_curDrag) {
  116.         if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
  117.             (Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
  118.              Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
  119.           if (NS4) {left = MM_targL; top = MM_targT;}
  120.           else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
  121.           else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
  122.           MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
  123.         if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
  124.         if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
  125.         retVal = false; if(!NS) event.returnValue = false; }
  126.       document.MM_curDrag = null;
  127.     }
  128.     if (NS) document.routeEvent(objName);
  129.   } return retVal;
  130. }

  131. function loadwin(obj){
  132.         with(MM_findObj(obj))with(style){
  133.                 filters[0].apply();
  134.                 display='';
  135.                 filters[0].play();
  136.         }
  137. }
  138. function cs(captionBG,bodyBG,tableBG){
  139. oldBody=document.body;
  140.         with(oldBody){
  141.                 var newBody=cloneNode();
  142.                 style.filter='blendtrans(duration=1)';
  143.                 filters[0].apply();
  144.                 with(document.styleSheets[0]){
  145.                         with(rules[0].style){backgroundColor=captionBG;}
  146.                         with(rules[1].style){backgroundColor=bodyBG;}
  147.                         with(rules[2].style){backgroundColor=tableBG}
  148.                 }
  149.                 filters[0].play();
  150.                 setTimeout(function(){
  151.                                 if(oldBody!=null){
  152.                                         oldBody.applyElement(newBody, "inside")
  153.                                         oldBody.swapNode(newBody);
  154.                                         oldBody.removeNode(true);
  155.                                         }
  156.                                 },1500);
  157.         }
  158. }
  159. //-->
  160. </script>
  161. <style type="text/css">
  162. <!--
  163. .caption {
  164.         font-size: 9px;
  165.         color: #FFFFFF;
  166.         background-color: #00CCFF;
  167.         padding-left: 5px;
  168.         cursor: default;
  169.         font-family: "Verdana", "Arial";
  170.         border: 1px inset;
  171. }
  172. body {
  173.         background-color: #f6f6f6;
  174.         border: 1px inset;
  175.         overflow: hidden;
  176. }
  177. table {
  178.         background-color: #eeeeee;
  179. }
  180. td {
  181.         font-family: "Verdana", "Arial";
  182.         font-size: 9px;
  183.         border: 0px;
  184. }
  185. .win {
  186.         filter:BlendTrans(duration=1) DropShadow(Color=#cccccc, OffX=3, OffY=3) alpha(opacity=90)
  187. }
  188. a {
  189.         text-decoration: none;
  190.         color: #003399;
  191. }
  192. a:hover {
  193.         color: #FF0000;
  194. }
  195. input {
  196.         font-family: "Verdana", "Arial";
  197.         font-size: 9px;
  198.         border-width: 1px;
  199. }
  200. .statusbar {
  201.         font-family: "Tahoma", "Verdana";
  202.         font-size: 9px;
  203.         color: #999999;
  204.         padding-left: 3px;
  205. }
  206. .button {
  207.         border: 1px outset;
  208.         text-align: center;
  209. }
  210. .navframe {
  211.         padding: 5px;
  212. }
  213. -->
  214. </style>
  215. </head>

  216. <body>
  217. <div id="assist" style="position:absolute; left:15px; top:68px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('assist','',0,0,150,18,true,false,-1,-1,-1,-1,15,68,100,'',false,'')">
  218.                 <table width="180" border="1" cellpadding="0" cellspacing="0">
  219.                                 <tr>
  220.                                                 <td class="caption">SeekAssist</td>
  221.                                                 <td width="14" align="center"><a href="#" onclick="with(MM_findObj('assistwin').style)display=display=='none'?'':'none'">%</a></td>
  222.                                                 <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('assist','','hide')">X</a></td>
  223.                                 </tr>
  224.                                 <tr id="assistwin">
  225.                                                 <td height="100" colspan="3" bordercolor="#eeeeee">&nbsp;</td>
  226.                                 </tr>
  227.   </table>
  228.         <br>
  229. </div>
  230. <script>loadwin('assist')</script>
  231. <div id="rank" style="position:absolute; left:15px; top:194px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('rank','',0,0,150,18,true,false,-1,-1,-1,-1,15,194,100,'',false,'')">
  232.                 <table width="180" border="1" cellpadding="0" cellspacing="0">
  233.                                 <tr>
  234.                                                 <td class="caption">SeekRank</td>
  235.                                                 <td width="14" align="center"><a href="#" onclick="with(MM_findObj('rankwin').style)display=display=='none'?'':'none'">%</a></td>
  236.                                                 <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('assist','','inherit','rank','','hide')">X</a></td>
  237.                                 </tr>
  238.                                 <tr id="rankwin">
  239.                                                 <td height="100" colspan="3" bordercolor="#eeeeee">&nbsp;</td>
  240.                                 </tr>
  241.   </table>
  242.                 <br>
  243. </div>
  244. <script>setTimeout("loadwin('rank')",500)</script>
  245. <div id="mycolor" style="position:absolute; left:15px; top:320px; width:185px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('mycolor','',0,0,150,18,true,false,-1,-1,-1,-1,15,320,100,'',false,'')">
  246.                 <table width="180" border="1" cellpadding="0" cellspacing="0">
  247.                                 <tr>
  248.                                                 <td class="caption">MyColor</td>
  249.                                                 <td width="14" align="center"><a href="#" onclick="with(MM_findObj('mycolorwin').style)display=display=='none'?'':'none'">%</a></td>
  250.                                                 <td width="14" align="center"><a href="#" onClick="MM_showHideLayers('mycolor','','hide')">X</a></td>
  251.                                 </tr>
  252.                                 <tr id="mycolorwin">
  253.                                                 <td height="100" colspan="3" bordercolor="#eeeeee"><table width="100%" border="0" cellspacing="0" cellpadding="2">
  254.                                                                 <tr>
  255.                                                                                 <td align="center"><a href="#" onclick="cs('#00CCFF','#f6f6f6','#eeeeee')">Default</a></td>
  256.                                                                 </tr>
  257.                                                                 <tr>
  258.                                                                                 <td align="center"><a href="#" onclick="cs('red','#eeccee','#eeddee')">StyleSheet#1</a></td>
  259.                                                                 </tr>
  260.                                                                 <tr>
  261.                                                                                 <td align="center"><a href="#" onclick="cs('#99ccff','#eeeeee','#ccddff')">StyleSheet#2</a></td>
  262.                                                                 </tr>
  263.                                                                 <tr>
  264.                                                                                 <td align="center"><a href="#" onclick="cs('#ff9999','#ffffff','#ffeeff')">StyleSheet#3</a></td>
  265.                                                                 </tr>
  266.                                                                 <tr>
  267.                                                                                 <td align="center"><a href="#" onclick="cs('skyblue','#eeeeee','#99ddff')">StyleSheet#4</a></td>
  268.                                                                 </tr>
  269.                                                                 <tr>
  270.                                                                                 <td align="center"><a href="#" onclick="cs('#009900','#eeffee','#ddffdd')">StyleSheet#5</a></td>
  271.                                                                 </tr>
  272.                                                 </table></td>
  273.                                 </tr>
  274.   </table>
  275.                 <br>
  276. </div>
  277. <script>setTimeout("loadwin('mycolor')",1000)</script>
  278. <div id="results" style="position:absolute; left:204px; top:68px; width:575px; z-index:1;display:none;" class="win" onMouseDown="MM_dragLayer('results','',0,0,400,18,true,false,-1,-1,-1,-1,204,68,50,'',false,'')">
  279.                 <table width="570" border="1" cellpadding="0" cellspacing="0">
  280.                                 <tr>
  281.                                                 <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  282.                                                                                 <tr>
  283.                                                                                                 <td class="caption">Results</td>
  284.                                                                                                 <td width="12" class="button"><a href="#" onClick="with(MM_findObj('resultswin').style)display=display=='none'?'':'none'">%</a></td>
  285.                                                                                                 <td width="12" class="button"><a href="#" onClick="MM_showHideLayers('results','','inherit')">X</a></td>
  286.                                                                                 </tr>
  287.                                                 </table></td>
  288.                                 </tr>
  289.                                 <tr>
  290.                                                 <td height="20" bordercolor="#eeeeee"><input name="url" type="text" value="http://www.google.com/search?q=ezlee" size="100">
  291.                                                 <a href="#" onclick="mainframe.location=url.value">Search</a></td>
  292.                                 </tr>
  293.                                 <tr id="resultswin">
  294.                                                 <td height="318" valign="top" class="navframe"><aiframe name="mainframe" id="mainframe" src="http://www.google.com/search?q=ezlee" width="100%" height="100%" frameborder="0" scrolling="auto"><font color="#FF0000">Welcome!</font></aiframe></td>
  295.                                 </tr>
  296.                                 <tr>
  297.                                                 <td height="14" class="statusbar">Ready!</td>
  298.                         </tr>
  299.   </table>
  300.                 <br>
  301. </div>
  302. <script>setTimeout("loadwin('results')",2000)</script>
  303. </body>
  304. </html>


复制代码
回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 23:14:57 | 显示全部楼层
长时间编辑网站,会使电脑速度变慢,电脑沉积文件变多!
上传个菜鸟(系统垃圾清理器)

双击就可以!

清除系统LJ.rar

384 Bytes, 下载次数: 215

回复

使用道具 举报

 楼主| SSAY 发表于 2007-6-26 23:17:29 | 显示全部楼层
预计10天后,我将会发布一套 

如何在最短时间内得到别人出售的商业风格教程!~~
希望大家留意!


教程已经在编辑,针对网站(暂不透露)!
回复

使用道具 举报

chr673673673 发表于 2007-6-26 23:24:12 | 显示全部楼层
精华贴
回复

使用道具 举报

coinyang 发表于 2007-6-26 23:35:57 | 显示全部楼层
非常感谢,做个记号慢慢看
回复

使用道具 举报

aqxsj 发表于 2007-6-27 00:06:06 | 显示全部楼层
强贴留名!!!!!!!!!!!!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-2 08:34 , Processed in 0.104499 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表