欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

CSS菜單:基本橫向菜單效果超炫_(tái)DIV+CSS實(shí)例

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!
  在CSS網(wǎng)頁布局中,我們比較頭疼的問題就是如何制作質(zhì)量高的CSS菜單。今天我們向大家介紹一個(gè)實(shí)例。這是一位國(guó)外高手nundroo制作的,下面是此菜單的效果圖:


  我們看此菜單的xhtml代碼:

示例代碼 [m.dounai2.com]
<ul>
<li id="bu1"><a href="#"><span>homepage</span></a></li>
<li id="bu2"><a href="#"><span>business</span></a></li>
<li id="bu3"><a href="#"><span>personal</span></a></li>
<li id="bu4"><a href="#"><span>information</span></a></li>
</ul>

  xhtml代碼非常簡(jiǎn)潔,就是一個(gè)無序列表UL。重點(diǎn)在于應(yīng)用CSS對(duì)其表現(xiàn)進(jìn)行控制與設(shè)置。

  我們看CSS代碼:

示例代碼 [m.dounai2.com]
body {
margin: 26px;
padding: 0;
background: #fff url(back.png) no-repeat;
}
span {
display: none;
}
ul {
position: relative;
width: 800px;
background: url(bg_nav.png) no-repeat;
height: 113px;
list-style-type: none;
margin: 0;
padding: 0;
}
li#bu1 a, li#bu2 a, li#bu3 a, li#bu4 a {
background: transparent;
position: absolute;
width: 110px;
height: 32px;
bottom: 0;
text-decoration: none;
}
/* adjusted values for IE6 */
* html*li#bu1 a, * html*li#bu2 a, * html*li#bu3 a, * html*li#bu4 a { bottom: -1px; }
li#bu1 a { left: 21px; }
li#bu2 a { left: 122px; background: url(business_hover.gif) 0 0 no-repeat; }
li#bu3 a { left: 223px; background: url(personal_hover.gif) 0 0 no-repeat; }
li#bu4 a { left: 324px; background: url(information_hover.gif) 0 0 no-repeat; }
li#bu2 a:hover, li#bu3 a:hover, li#bu4 a:hover { background-position: 0 -32px; }

  查看最終的運(yùn)行效果:

代碼調(diào)試框 [m.dounai2.com]

[ 可先修改部分代碼 再運(yùn)行查看效果 ]

  

來源:無憂整理//所屬分類:DIV+CSS實(shí)例/更新時(shí)間:2007-03-19
相關(guān)DIV+CSS實(shí)例