+ 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?
3 Antworten
+ 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
+ 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;
}