1.很普通的一个导航条,不同之处是只采用了一张背景图片,如左图。

2.初始状态:背景为上半部分,翻转为下半部分,预览最终效果>>,代码如下。

#nav{
	width: 400px;
	text-align: center;
	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
}

#nav ul{
	margin: 0px;
	padding: 0px;
	list-style-type: none;
}

#nav li{
	float: left;
}

#nav li a{
	text-decoration: none;
	color: #666666;
	background: url(img/bg.gif) no-repeat 0px 0px;
	width: 100px;
	line-height: 20px;
	display: block;
}

#nav li a:hover{
	color: #CC0000;
	background: url(img/bg.gif) no-repeat 0px -20px;
	: ;
}
<div >Services</a></li></ul></div>

相关文章: