+ 1

a:hover pseudo classs

With the a:hover pseudo-class; say I have two different links that set over different background colors, so I need to have different a:hover background colors to make sure they both stand out and look nice. How do I set these two different links to have different properties for the a:hover?

15th Jun 2020, 11:52 AM
Jackie Tate
Jackie Tate - avatar
2 Respuestas
+ 7
It's a property of element which take place when you put cursor on that element and you can set action what to happen when you were calling that property
15th Jun 2020, 12:18 PM
vaibhav
vaibhav - avatar
+ 3
:hover can be used with any selector, not just a , so you can have different id for each link like so #link1:hover { background-color:red; } #link2:hover { background-color:blue; }
15th Jun 2020, 12:03 PM
Andrei I
Andrei I - avatar