页面跳转后 css样式a:active不起作用
css代码如下:
#gnav1{
width:135px;
background:url(../img/base/common_sprite.png) no-repeat 0 -86px;
}
#gnav1 a, #gnav1 a:visited {
background:url(../img/base/common_sprite.png) no-repeat 0 -48px;
}
#gnav1 .active, #gnav1 a:hover, #gnav1 a:active {
background:url(../img/base/common_sprite.png) no-repeat 0 -86px;
}
JSP代码:
<a href="<bean:write name="contextPath" />/member/top/top.do">HOME</a>
问题:
鼠标放在链接HOME上,hover效果起作用,但是点击链接后(跳转到自画面),active效果就没有了,是未选中visited状态。请问跳转后如何让active效果起作用?