CSS - a:visited:hover?

前端 未结 4 953
花落未央
花落未央 2021-02-01 17:17

How can I apply a font color only to hyperlinks which have already been visited and are being hover by the mouse?

Essentially, wha

4条回答
  •  孤城傲影
    2021-02-01 17:38

    FWIW, I was unable to style just color on a:visited:hover (Chrome/FF) without declaring a background for :link:hover (anything other than none or inherit seems to work, I used rgba() for alpha sake).

    For this to work in Chrome/FF:

    a:visited:hover {
        color: #f00;
    }
    

    ... (something like) this must be present:

    a:link:hover {
        background-color: rgba(255, 255, 255, 0);
    }
    

提交回复
热议问题