一个简洁的滑动门代码

XML/HTML代码
  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=gb2312" />  
  5. <title>▒ 恋婷滑动门技术</title>  
  6. <style media="screen" type="text/css">  
  7. <!--   
  8. *{font-size:12px;}   
  9. html,body{margin:0;text-align:center;over-flow:hidden;height:100%;width:100%;}   
  10. UL{list-style-type:none; margin:0px;}   
  11.   
  12. /* 标准盒模型 */   
  13. .ttl{height:18px;}   
  14. .ctt{height:auto;padding:6px;clear:both;border:1px solid #064ca1;border-top:0;text-align:left;}   
  15. .w936{margin:2px 0;clear:both;width:936px;/*这里调整整个滑动门的宽度*/}   
  16.   
  17. /* TAB 切换效果 */   
  18. .tb_{background-image: url('http://www.dc18.com/images/barbg_tab.gif'); background-repeat: repeat-x;background-color: #E6F2FF;}   
  19. .tb_ ul{height:24px;}   
  20. .tb_ li{float:left;height: 24px;line-height:1.9;width: 94px;cursor:pointer;}   
  21.   
  22. /* 用于控制显示与隐藏的css类 */   
  23. .normaltab   { background-image:url('http://www.dc18.com/images/normal_tab.gif'); background-repeat: no-repeat; color:#1F3A87 ;}   
  24. .hovertab    { background-image: url('http://www.dc18.com/images/hover_tab.gif'); background-repeat: no-repeat; color:#1F3A87; font-weight:bold }   
  25. .dis{display:block;}   
  26. .undis{display:none;}   
  27. -->  
  28. </style>  
  29. <script type="text/javascript" language="javascript">  
  30. //<!CDATA[   
  31. function g(o){return document.getElementById(o);}   
  32. function HoverLi(n){   
  33. //如果有N个标签,就将i<=N;   
  34. //本功能非常OK,兼容IE7,FF,IE6;http://www.xiaogezi.cn/ [小鸽子]系列   
  35. for(var i=1;i<=6;i ){g('tb_' i).className='normaltab';g('tbc_0' i).className='undis';}g('tbc_0' n).className='dis';g('tb_' n).className='hovertab';   
  36. }   
  37. //如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;   
  38. //]]>  
  39. </script>  
  40. </head>  
  41.   
  42. <body>  
  43.   
  44. <div class="w936">  
  45. <div id="tb_" class="tb_">  
  46. <ul>  
  47. <li id="tb_1" class="hovertab" onmouseover="x:HoverLi(1);">  
  48. 流行音乐</li>  
  49. <li id="tb_2" class="normaltab" onmouseover="i:HoverLi(2);">  
  50. 美女写真</li>  
  51. <li id="tb_3" class="normaltab" onmouseover="a:HoverLi(3);">  
  52. 平面设计</li>  
  53. <li id="tb_4" class="normaltab" onmouseover="o:HoverLi(4);">  
  54. 网络学堂</li>  
  55. <li id="tb_5" class="normaltab" onmouseover="g:HoverLi(5);">  
  56. 恋爱宝典</li>  
  57. <li id="tb_6" class="normaltab" onmouseover="z:HoverLi(6);">  
  58. Q小鸽子</li>  
  59. </ul>  
  60. </div>  
  61. <div class="ctt">  
  62. <div class="dis" id="tbc_01">流行音乐 的内容</div>  
  63. <div class="undis" id="tbc_02">美女写真 的内容</div>  
  64. <div class="undis" id="tbc_03">平面设计 的内容</div>  
  65. <div class="undis" id="tbc_04">网络学堂 的内容</div>  
  66. <div class="undis" id="tbc_05">恋爱宝典 的内容</div>  
  67. <div class="undis" id="tbc_06"><b>[Q小鸽子] 的内容</b><br /><img src="http://vickeychen.go3.icpcn.com/images/logo_main.GIF" alt="中国最Q小鸽子" />  
  68. </div>  
  69. </div>  
  70. </div>  
  71.   
  72. <hr author="http://xiaogezi.cn" size="1" noshade="noshade" style="color:#064ca1;margin-top:30px;" />  
  73. </body>  
  74. </html>  

关键词: 滑动门

上一篇: 广州:热浪逼人(组图)
下一篇: MYSQL出错代码列表一览

访客评论
#1
回复 sooler 2011, April 14, 4:48 PM
哎!你用什么红冒的logo啊
#2
回复 rocing 2011, April 15, 9:27 AM
引用 sooler 说过的话:
哎!你用什么红冒的logo啊
怎么了?
发表评论

评论内容 (必填):