蓝色圆角水平导航菜单(示例代码)
2011-11-14 15:43
477 查看
(示例图片)
(index.html页面)
、<!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>蓝色圆角水平导航菜单 by www.865171.cn</title>
<link href="index_files/style.css" rel="stylesheet" type="text/css">
</head><body>
<div id="menu">
<ul>
<li><a href="http://www.865171.cn/css-menu/" class="current"><span>首页</span></a></li>
<li><a href="http://www.865171.cn/css-menu/"><span>www.865171.cn</span></a></li>
<li><a href="http://www.865171.cn/css-menu/"><span>更多CSS菜单</span></a></li>
</ul>
</div>
</body></html>
(style.css页面)
*{
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;
}
(index.html页面)
、<!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>蓝色圆角水平导航菜单 by www.865171.cn</title>
<link href="index_files/style.css" rel="stylesheet" type="text/css">
</head><body>
<div id="menu">
<ul>
<li><a href="http://www.865171.cn/css-menu/" class="current"><span>首页</span></a></li>
<li><a href="http://www.865171.cn/css-menu/"><span>www.865171.cn</span></a></li>
<li><a href="http://www.865171.cn/css-menu/"><span>更多CSS菜单</span></a></li>
</ul>
</div>
</body></html>
(style.css页面)
*{
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实现蓝色圆角效果水平导航菜单代码
- jQuery+css实现的蓝色水平二级导航菜单效果代码
- jQuery+css实现的蓝色水平二级导航菜单效果代码
- div+css实现软件公司网站蓝色导航菜单代码
- 很漂亮的蓝色经典CSS导航菜单代码
- jQuery ui实现动感的圆角渐变网站导航菜单效果代码
- js选择并转移导航菜单示例代码
- 来自一个博客里的竖向CSS圆角导航菜单代码
- js实现改进的仿蓝色论坛导航菜单效果代码
- 很漂亮的蓝色半透明水平下拉导航代码
- js选择并转移导航菜单示例代码
- 竖向蓝色圆角经典的CSS菜单代码
- jQuery ui实现动感的圆角渐变网站导航菜单效果代码
- js选择并转移导航菜单示例代码
- 分享一款纯CSS3水平控制导航菜单和选择项
- 绿色带阴影的CSS导航菜单代码
- CSS3圆角导航菜单