找回密码
 注册
查看: 2993|回复: 2
收起左侧

[分享] 论坛顶部LOGO右侧添加切换到其它城市功能

[复制链接]

5312

主题

8317

帖子

1万

积分

管理员

出售国内外虚拟空间

Rank: 10Rank: 10Rank: 10

积分
14660
帖子
8317
精华
67
体力
14660 点
蓝豆
2391 点
注册时间
2007-6-8

终身成就奖LY官方团队会员身份ID卡

发表于 2012-9-26 10:01:03 | 显示全部楼层 |阅读模式
QQ截图20120926095838.jpg

打开:/template/default/common/header.htm
  1. <h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="./" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>

复制代码
下面添加
  1. <!--切换开始-->
  2. <style type="text/css">
  3. #city *{ margin:0;padding:0; z-index:1000000; top:0;left:0px; float:left;}
  4. #warpper{ position: relative; z-index:1000000; margin-top:5px;}
  5. #city { font:normal 12px Verdana, Arial, Helvetica, sans-serif; text-align:center; z-

  6. index:1000000;}
  7. #city a{ cursor:pointer; color:#666}
  8. #city dl{ height:18px; line-height:18px; padding:0 10px;}
  9. #city dt,.normal{ float:left; padding:0 10px 0 0 ; border-right:0px solid #ccc; text-

  10. decoration:none; width:auto; cursor:pointer; color:#FF3300; font-weight:bold;}
  11. #city dt.over{ position:relative;padding:0 10px 0px 0px; z-index:1000001;color:#FF3300;

  12. font-weight:bold; height:20px; }
  13. #city li{ float:left; list-style-type:none; margin:0px 5px; width:160px;}
  14. #city #c1 li a{ float:left; list-style-type:none; margin:0px 3px; 0 0 }
  15. #city dl dd{ position:absolute; width:160px; left:0;top:20px!important; border:1px solid

  16. #bbb; background:#fff; filter:progid:DXImageTransform.Microsoft.Shadow(Strength=4,

  17. Direction=120, color=#cccccc); padding:3px 0;}
  18. .block{ display:block;}
  19. .none{ display:none;}
  20. </style>
  21. <script language="javascript">
  22. function $(str){ return document.getElementById(str);}
  23. function $$(str){ return document.getElementsByTagName(str);}
  24. var timer;
  25. function changeMenu(thisObj,num){
  26. if(thisObj.className=="over") return false;
  27. hids(thisObj);
  28. thisObj.className="over";
  29. $("c"+(num+1)).className="block";

  30. $("c"+(num+1)).onmouseover=function(){clearTimeout(timer);}
  31. $("c"+(num+1)).onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},500)}
  32. thisObj.onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},3000)}

  33. }
  34. function hids(thisObj){
  35. clearTimeout(timer);
  36. var tabObj=thisObj.parentNode.getAttribute("id");
  37. var obj_dt=$(tabObj).getElementsByTagName("dt");
  38. for(var i=0;i<obj_dt.length;i++){
  39. obj_dt[i].className="normal";
  40. $("c"+(i+1)).className="none";
  41. }
  42. }
  43. </script>
  44. <div id="city">
  45. <dl id="warpper">
  46. <dt onMouseOver="changeMenu(this,0);">[切换其它城市]</dt>
  47. <dd id="c1" class="none">
  48. <ul>
  49. <li>
  50. <a href="forum-358-1.html">遂平</a> <a href="forum-360-1.html">西平</a> <a href="forum-361-

  51. 1.html">上蔡</a> <a href="forum-364-1.html">汝南</a> <a href="forum-365-1.html">平舆</a> <a

  52. href="forum-365-1.html">新蔡</a> <a href="forum-365-1.html">正阳</a> <a href="forum-368-

  53. 1.html">确山</a> <a href="forum-365-1.html">泌阳</a>

  54. </li>
  55. </ul>
  56. </dd>
  57. </dl>

  58. </div>
  59. <!--切换_结束-->
复制代码
游客,如果您要查看本帖隐藏内容请回复
出售国内或美国高性能虚拟空间,高速VPS以及服务器! 同时承接各种类型的网站制作,网站维护,支付宝交易安全放心!    联系QQ:6102031
懒得打字嘛,点击右侧快捷回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

网站公告上一条 /2 下一条

GMT+8, 2024-4-26 01:29 , Processed in 0.109375 second(s), 32 queries , Gzip On.

© 2006-2022 Powered by Discuz! X3.4

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