- 相關推薦
純css實現藍色圓角效果水平導航菜單代碼
這是一款可愛的藍色圓角水平導航菜單,用到幾張背景圖片,我覺得這款菜單挺實用,特別是用在個人博客中非常合適。在兼容性方面做的也很好,幾乎兼容所有的瀏覽器。
運行效果截圖如下:
代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>藍色圓角水平導航菜單</title>
<style>
*{
margin:0;
padding:0;
}
body{
background:#fff;
color:#666;
font:12px/18px Tahoma, Arial, Helvetica, sans-serif;
}
#menu{
width:100%;
margin:15px;
}
#menu ul{
list-style:none;
}
#menu li{
list-style:none;
display:block;
float:left;
margin:0 2px;
}
#menu li a{
display:block;
float:left;
height:66px;
color:#fff;
text-transform:uppercase;
font-size:11px;
font-weight:bold;
background:url(images/menu_009_l.jpg) no-repeat left;
line-height:66px;
padding:0 0 0 9px;
text-decoration:none;
}
#menu li a span{
display:block;
float:left;
background:url(images/menu_009_r.jpg) no-repeat right;
height:66px;
color:#d2eeff;
line-height:66px;
padding:0 18px 0 8px;
}
#menu li a:hover{
display:block;
float:left;
background:url(images/menu_009_h_l.jpg) no-repeat left;
height:66px;
}
#menu li a:hover span{
display:block;
float:left;
background:url(images/menu_009_h_r.jpg) no-repeat right;
color:#fff;
height:66px;
}
#menu li a.current{
display:block;
float:left;
height:66px;
color:#fff;
text-transform:uppercase;
font-size:11px;
font-weight:bold;
background:url(images/menu_009_h_l.jpg) no-repeat left;
line-height:66px;
padding:0 0 0 9px;
text-decoration:none;
}
#menu li a.current span{
display:block;
float:left;
background:url(images/menu_009_h_r.jpg) no-repeat right;
height:66px;
color:#fff;
line-height:66px;
padding:0 18px 0 8px;
}
【純css實現藍色圓角效果水平導航菜單代碼】相關文章:
CSS如何實現中英文雙語菜單效果代碼12-04
css實現的tab切換效果實例03-29
讓網站變灰的css代碼實例12-02
CSS 如何使p層水平居中03-29
使用python實現Linux異步epoll的代碼03-01
java構造函數實現代碼示例04-03
PHP實現大文件上傳源代碼11-23