CSS settings:
#page a:hover {text-decoration:none; color:red;}
#page a:active {text-decoration:underline; color:red ;}
After selecting, click on other blank areas, and the set a:active style will disappear. This style should be retained until other links of the same level are clicked...
Pseudo-class, compatibility is not very good. You can use js to add a class after clicking.
a:link {color: #FF0000} /* 未访问的链接 */a:visited {color: #00FF00} /* 已访问的链接 */a:hover {color: #FF00FF} /* 当有鼠标悬停在链接上 */a:active {color: #0000FF} /* 被选择的链接 */
CSS code?1234a:link {color: #FF0000} /* Not visited Link */a:visited {color: #00FF00} /* Visited link */a:hover {color: #FF00FF} /* When the mouse is hovering over the link */a:active {color: #0000FF } /* The selected link */
This is only activated...
Doesn’t this count as activated when the link is clicked?
This should be the moment you click, before the mouse is released. . In the process of operation. . . .
This should be the moment you click, before the mouse is released. . In the process of operation. . . .
Okay, then may I ask, how to change it?
Can’t changing it to a:visited achieve the effect you want?
Or, if you want more effects, you can use them in combination
For example, a:visited:hover, which represents the links that have been visited, and the situation when the mouse is hovering.
Try your own combination according to your own situation.
However, if you operate too many times, it is best to clear the cache, because the browser will remember the websites you visited before, and after refreshing, it will still show that you have visited it.
Can’t changing it to a:visited achieve the effect you want?
Or, if you want more effects, you can use them in combination
For example, a:visited:hover, which represents the links that have been visited, and the situation when the mouse is hovering.
Try your own combination according to your own situation.
1