Have you ever wondered if there's a way to make an icon act like a link when clicked, just like regular text links turning purple? And not just the last one clicked, but every single icon that gets clicked. Trying to use the :visited pseudo was unsuccessful in achieving this effect.
.visit {
fill: lightblue;
}
.visit:visited {
fill: green;
}
<a href="#"><svg>
<rect width='300' height='100' class='visit'></rect>
</svg></a>
If you have solutions using jQuery and JavaScript, feel free to share, but if there's a way to achieve this effect with just HTML and CSS, that would be ideal.