-4
rated 0 times
[
3]
[
7]
/ answers: 1 / hits: 24864
/ 13 Years ago, sun, may 15, 2011, 12:00:00
I understand that the following method is great for setting CSS styles because of browser compatibility.
element.style.cssText = color:red;;
What I can't do is use cssText
to apply styles on the :hover
and :focus
CSS events.
What do I do instead of this?
element.style.cssText = :focus{color:red;};
P.S. Don't mention using javascript events such as onmouseover
instead of the CSS :hover
( It doesn't fit my situation.)
More From » css