好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

求助:a:active不生效!!_html/css_WEB-ITnose

我想用以下css实现:选择一个菜单后,停留在a:active的样式上。

现在的问题是:当鼠标按下去的时候样式是有的,一松开或移走,就回到a:link的样式了。



/*CSS样式*/

#menu ul li {background: #eef; border-bottom: 1px solid #CCC; float:left;}
#menu ul li a { display:block; height: 38px; width:168px; line-height: 38px; float:left;}
#menu ul li a:link {background: #eef; color:#666;}
#menu ul li a:visited {background: #eef; color:#666;}
#menu ul li a:hover { background:#3ab3ec; font-size:14px; color:#fff; font-weight:bold;}
#menu ul li a:active { background:#3ab3ec; font-size:14px; color:#fff; font-weight:bold;}

/*html代码*/

查看更多关于求助:a:active不生效!!_html/css_WEB-ITnose的详细内容...

  阅读:30次