八月 09, 2007

[模版改造] 如何增加頁首的水平選單


想要加入如同阿杰老師網誌上的水平選單嗎?

你必須要在 roodo.cssheader.template 兩個檔案中加入程式碼!


roodo.css 加入程式碼

/* 水平選單 */

#hnav {

font-size: small;

}


#hnav li ul li a { /* for sub-menu items */
/* Apply the width here (not to li) so that IE regards entire width as clickable */
/* This also seems to fix the "3px gap between list items" bug in IE. */
width: 6em;
border-top-style: none; /* to get single line between items */
padding: 1px 10px 2px 10px;
}
/* note: important to keep ordering of LVHA link, visited, hover, active */
#hnav ul li { display: inline; }

#hnav ul li a
{

padding: 0.2em 1em;
background-color: #121212; /* 背景色彩 */color: #bfbfbf; /* 平常的文字色彩 */text-decoration: none;
border-right: 1px solid #fff;
}

#hnav ul li a:hover
{
background-color: #94C22C; /* 移上的背景色彩 */color: #fff; /* 移上的文字色彩 */}

#navlist li #current
{
color: #799F27;
}


header.template 加入程式碼

你可以依需求去增減或修改程式碼!

<!-- --------------------------------------------------------------------------
頁頭主選單
-------------------------------------------------------------------------- -->
<div id="hnav"><ul>
<li><a title="{$locale->tr("main")}" href="{$url->blogLink()}">{$locale->tr("main")}</a></li>


<li><a title="{$locale->tr("archives")}" href="{$url->templatePage("archives")}">{$locale->tr("archives")}</a></li>


<li><a title="{$locale->tr("links")}" href="{$url->templatePage("bookmark")}">{$locale->tr("links")}</a> </li>


<li><a title="{$locale->tr("admin")}" href="{$url->getAdminUrl()}">{$locale->tr("admin")}</a></li>


<li><a class=aside title="臺北市教師研習中心部落格" href="{$url->getBaseUrl()}/summary.php">北市教研中心部落格</a></li></ul>
</div>


發佈者: 小烏龜 at 13:47│  點閱次數 (117)│ 修改文章管理迴響迴響 (5)plog建置研習200708
回應文章

1

作者回答:Re:[模版改造] 如何增加頁首的水平選單


test

Posted by 小烏龜 at 27/08/2007, 11:53

2

作者回答:Re:[模版改造] 如何增加頁首的水平選單


test

Posted by 小烏龜 at 27/08/2007, 11:56

3

作者回答:Re:[模版改造] 如何增加頁首的水平選單


test03

Posted by 小烏龜 at 27/08/2007, 11:57

4

Re:[模版改造] 如何增加頁首的水平選單


test04

Posted by fofung at 27/08/2007, 11:57

5

Re:[模版改造] 如何增加頁首的水平選單


test05

Posted by fofung at 27/08/2007, 12:00
(必要)
authimage

:);-):'(:(:P8):O:D