
修改方法如下:
7.2 版本的,開啟:/templates/default/header.htm (非預設風格,則修改風格中的 header.htm)
搜尋從下程式碼:
<h2><a href="$indexname" title="$bbname">{BOARDLOGO}</a></h2>
在這個網站模板程式碼下面新增以下程式碼 (程式碼回覆可見,與 X2.0 程式碼一樣)
X2.0 版本的,開啟:/template/default/common/header.htm (非預設風格,則修改風格中的 header.htm)
搜尋從下程式碼:
<h2><!--{if
!isset($_G['setting']['navlogos'][$mnid])}--><a href="./"
title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>
在其下面新增以下程式碼 (程式碼回覆可見)
本帖隱藏的內容
- <!--城市切換 QQ719468490-->
- <style type="text/css">
- #city *{ margin:0;padding:0; z-index:1000000; top:0;left:0px; float:left;}
- #warpper{ position: relative; z-index:1000000; margin-top:20px;}
- #city { font:normal 12px Verdana, Arial, Helvetica, sans-serif; text-align:center; z-index:1000000;}
- #city a{ cursor:pointer; color:#666}
- #city dl{ height:18px; line-height:18px; padding:0 10px;}
- #city dt,.normal{ float:left; padding:0 10px 0 0 ;
border-right:0px solid #ccc; text-decoration:none; width:auto;
cursor:pointer; color:#FF3300; font-weight:bold;} - #city dt.over{ position:relative;padding:0 10px 0px 0px; z-index:1000001;color:#FF3300; font-weight:bold; height:20px; }
- #city li{ float:left; list-style-type:none; margin:0px 5px; width:160px;}
- #city #c1 li a{ float:left; list-style-type:none; margin:0px 3px; 0 0 }
- #city dl dd{ position:absolute; width:160px;
left:0;top:20px!important; border:1px solid #bbb; background:#fff;
filter:progid:DXImageTransform.Microsoft.Shadow(Strength=4,
Direction=120, color=#cccccc); padding:3px 0;} - .block{ display:block;}
- .none{ display:none;}
- </style>
- <script language="javascript">
- function $(str){ return document.getElementById(str);}
- function $$(str){ return document.getElementsByTagName(str);}
- var timer;
- function changeMenu(thisObj,num){
- if(thisObj.className=="over") return false;
- hids(thisObj);
- thisObj.className="over";
- $("c"+(num+1)).className="block";
- $("c"+(num+1)).onmouseover=function(){clearTimeout(timer);}
- $("c"+(num+1)).onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},500)}
- thisObj.onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},3000)}
- }
- function hids(thisObj){
- clearTimeout(timer);
- var tabObj=thisObj.parentNode.getAttribute("id");
- var obj_dt=$(tabObj).getElementsByTagName("dt");
- for(var i=0;i<obj_dt.length;i++){
- obj_dt[i].className="normal";
- $("c"+(i+1)).className="none";
- }
- }
- </script>
- <div id="city">
- <dl id="warpper">
- <dt onMouseOver="changeMenu(this,0);">[去其他縣市]</dt>
- <dd id="c1" >
- <ul>
- <li><a href="forum-358-1.html"> 遂平</a> <a
href="forum-360-1.html"> 西平</a> <a
href="forum-361-1.html"> 上蔡</a> <a
href="forum-364-1.html"> 汝南</a> <a
href="forum-365-1.html"> 平輿</a> <a
href="forum-365-1.html"> 新蔡</a> <a
href="forum-365-1.html"> 正陽</a> <a
href="forum-368-1.html"> 確山</a> <a
href="forum-365-1.html"> 泌陽</a> - </li>
- </ul>
- </dd>
- </dl>
- </div>
- <!--城市切換_結束 QQ719468490-->
備註:如果您的縣市名稱不是兩個字,且排列不是 5 個一行,出現錯位的話
請修改程式碼中的:width:160px; 中的 160 大小
既調整一下寬度,總共兩處要同時修改即可