a:active only briefly works (during mouse click)

后端 未结 4 2067
-上瘾入骨i
-上瘾入骨i 2021-01-22 07:19

For some reason, I made it so my text (a) that is active is bolded, but it is only active when it is clicked with my mouse, when it is released from the click, it turns off and

4条回答
  •  离开以前
    2021-01-22 07:53

    That's because that link is only active hen you click it with the mouse. If you want the effect to last for the entire length of the mouse being over it use :hover. If you want it to last after the page has been visited use :visited.

    edit

    If you want the link to stay active when a new page is loaded you'll need to give that link a class that applies that style to it:

  • Images
  • #searchtopics a:active, a.active {

提交回复
热议问题