html - Inline style to act as :hover in CSS -
i know embedding css styles directly html tags affect defeats of purpose of css, it's useful debugging purposes, in:
<p style="font-size: 24px">asdf</p>
what's syntax embedding rule like:
a:hover {text-decoration: underline;}
into style attribute of tag? it's not this...
<a href="foo" style="text-decoration: underline">bar</a>
...since apply time, opposed during hover.
i'm afraid can't done, pseudo-class selectors can't set in-line, you'll have on page or on stylesheet.
i should mention technically should able according css spec, browsers don't support it
edit: did quick test this:
<a href="test.html" style="{color: blue; background: white} :visited {color: green} :hover {background: yellow} :visited:hover {color: purple}">test</a>
and doesn't work in ie7, ie8 beta 2, firefox or chrome. can else test in other browsers?
Comments
Post a Comment