Is it possible to achieve the effect of highlighting strings without javascript?

I want tr to hang at the moment to change the color, and then change it when the mouse is no longer above it. Is it possible to use pure CSS, or is this javascript the only solution? (I currently have a javascript solution, so I don't need examples of this)

Thanks!

+3
source share
3 answers

Yes, this is possible in CSS. In the example below, there will usually be a red background and a green background when the line freezes.

tr td { background: #f00; } 
tr:hover td { background: #0f0; }

However, it should be noted that this will not work in IE6 because it does not understand the pseudo-class of the ": hover" class for any elements other than <a>.

+17
source

, javascript - , - .

+1

, hover css.

0
source

All Articles