Is it possible to remove the background-color property of a :hover rule?
I have a set of elements that change color when hovered over. I want to add another CSS rule to prevent this color change. Here's an example:
How can I modify the second instance of the "style1:hover" rule to completely disable the color change effect? The end result should be the same as if all "style1:hover" rules were removed.
I'd like to avoid having to redefine all the styles ("green" and "blue") again. My objective is to simply turn off 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 do I disable the color change from here? */
}
Thank you!