为导航按钮写两个CSS样式,然后分别针对链接的四个状态来写链接的CSS样式
比如:
.mainNavLine{width:10px;height:33px;overflow:hidden;background-image:url(../Images/sprite_10px.jpg);background-position:0 -66px;}
.mainNoSelLi a:link,.mainNoSelLi a:visited{color:#000;}
.mainNoSelLi a:hover,.mainNoSelLi a:active,.mainSelLi a:link,.mainSelLi a:visited,.mainSelLi a:hover,.mainSelLi a:active{color:#000;background:url(../Images/ico_selLink.jpg) center center no-repeat;text-decoration:none;}