开发者

Css active isse:not working

开发者 https://www.devze.com 2022-12-23 05:07 出处:网络
How to make css active color be greeen when the hyperlink is clicked. i tried the below code but it does work

How to make css active color be greeen when the hyperlink is clicked.

i tried the below code but it does work

Note that LeftNavBG_2 is a green image

a:active.leftMenu { /* Left Menu */
 font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
 font-size: 14px;
 c开发者_如何学编程olor: #000;
 text-decoration: none;
 width: 144px;
 margin-bottom: 5px;
 display: block;
 max-width: 144px !important;
 vertical-align: bottom;
 padding-top: 5px;
 padding-bottom: 5px;
 background-image: url(../images/LeftNavBG_2.gif);

}


You should indicate your class before the pseudo-selector. Try a.leftMenu:active rather than a:active.leftMenu.


Make it green when the user clicks the link (mouse down):

a.leftMenu:active, a.leftMenu:focus
{
   /*your css here*/
}

Make it green when the user visited, clicked, the link:

a.leftMenu:visited
{
   /*your css here*/
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号