DIV+CSS實現的綠色水平一級菜單代碼

來源:文萃谷 3.74K

本文實例講述了p+CSS實現的綠色水平一級菜單代碼。分享給大家供大家參考。

DIV+CSS實現的綠色水平一級菜單代碼

這是一款基於p+CSS實現的綠色水平網站菜單,相信是你喜歡的一種CSS菜單,綠色風格,用到了幾張背景圖片,大家順着路徑把圖片下載下來吧。這款菜單整體感覺效果不錯,兼容性又好,不管是用在你的.網站或是學習研究CSS,都是不錯的選擇。

  運行效果截圖如下:

918.jpg

代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"">

<html xmlns="">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>綠色水平CSS菜單</title>

<style>

body{font-size:12px;font-family:Arial,Helvetica,'宋體',sans-serif;color:#333;background:#fff;margin:0;}

a:link{color:#0041D9;text-decoration:none;outline:none;}

a:visited{color:#0041D9;text-decoration:none;outline:none;}

a:hover{color:#f60;text-decoration:underline;outline:none;}

a:active{color:#0041D9;text-decoration:none;outline:none;}

#header{position:relative;width:100%;}

p.bar{position:relative;height:42px;background:url(images/mainmenu.bg14_6x42.gif) repeat-x;}

#header ar{width:900px;}

#header ar {left:266px;position:absolute;top:41px;font-size:14px;font-weight:bold;}

#header ar a{float:left;width:80px;height:24px;line-height:24px;padding-top:7px;text-align:center;color:#000;font-weight:lighter;font-size:14px;background:transparent;}

#header ar a:hover{background:#fff url(images/nav_hover_80x31.gif) no-repeat;text-decoration:none;margin-left:-1px;padding-left:1px;}

#header ar ved{background:#fff url(images/nav_80x31.gif) no-repeat;font-weight:bold;color:#fff;margin-left:-1px;padding-left:1px;}

#header ar ved:hover{background:#fff url(images/nav_80x31.gif) no-repeat;font-weight:bold;color:#fff;text-decoration:underline;}

#header ar {position:absolute;left:266px;top:41px;width:560px;height:31px;z-index:-1;}

#header ar {float:left;width:80px;height:31px;background:transparent url(images/navleft2_80x31.gif) no-repeat;}

#header ar {float:left;width:80px;height:31px;background:transparent url(images/navlcenter_80x31.gif) no-repeat;}

熱門標籤