纯css实现蓝色圆角效果水平导航菜单代码
发布时间:2015-10-08 来源:查字典编辑
摘要:本文实例讲述了纯css实现蓝色圆角效果水平导航菜单代码。分享给大家供大家参考。具体如下:这是一款可爱的蓝色圆角水平导航菜单,用到几张背景图片...
本文实例讲述了纯css实现蓝色圆角效果水平导航菜单代码。分享给大家供大家参考。具体如下:
这是一款可爱的蓝色圆角水平导航菜单,用到几张背景图片,我觉得这款菜单挺实用,特别是用在个人博客中非常合适。在兼容性方面做的也很好,几乎兼容所有的浏览器。
运行效果截图如下:
/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=/1999/xhtml
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;
}
/style
/head
div id=menu
a href=# class=current首页/span/a/li
a href=#精品脚本下载/span/a/li
a href=#网页模板/span/a/li
/body
/html
希望本文所述对大家的div+css网页设计有所帮助。