重置访问的颜色

1 html css hyperlink hover

我需要在悬停时更改链接的颜色,但是一旦点击就返回原始版本,我当前使用的代码会在点击链接后停止更改悬停.

<div id="nav1"><a href="clients.html">/Clients</a></div>

#nav1 {
    position: absolute;
    font-family: "Gill Sans";
    font-weight: 300;
    font-size: 10pt;
    letter-spacing: 0.15em;
    color: #fff;
    margin-top: 30px;
    margin-left: 20px;
}
#nav1 a:link {
    color: #fff;
    text-decoration: none;
}
#nav1 a:hover {
    color: #e8138b;
    text-decoration: overline;
}
#nav1 a:visited {
    color: #fff;
    text-decoration: none;
}
Run Code Online (Sandbox Code Playgroud)

Kel*_*tex 5

把你的声明放在a:hover后面a:visited.