How to override and reset a background-color property from a hover rule?
Is there a way to reset a background-color property of a :hover rule?
I have a list of elements which are highlighted when mouse goes over. I
want to apply an additional CSS rule that will disable highlighting. Here
is a demo:
http://jsfiddle.net/vqLuU/1/
What should I put in the second appearance of the "style1:hover" rule in
order to disable highlighting at all? The result must be the same with
case when all "style1:hover" rules are removed.
I do not want to redefine all styles ("blue" and "red") again. My goal is
to disable the "style1:hover" rule.
HTML:
<div class="style1 green">AAA</div>
<div class="style1 blue">BBB</div>
CSS:
.green {
background-color: green;
}
.blue {
background-color: blue;
}
.style1:hover {
background-color: red;
}
.style1:hover {
/* How to disable highlighting from here? */
}
Thanks!
No comments:
Post a Comment