- Web design
- CSS
- Pseudo class
- here
visited pseudo-class --Introduction to CSS [CSS3 compatible]
The visited pseudo-class is a pseudo-class for styling visited links. Used in combination with a tag.
<style>
a: visited {
color: red;
}
</style>
<a href="/"> Visited links</a>
How to make it the same color as the original link?
Specify multiple CSS at once or use inherit.
/ * Specify multiple CSS at once * /
a, a: visited {
color: red;
}
/ * Inherit colors using inherit * /
a {
color: red;
}
a: visited {
color: inherit;
}
HTML・CSS Writing 2022