html - Is there a way to change css on hover with (style="")? -


this question has answer here:

i know can import css file contains, let's say:

div {     color: black;  }  div:hover {     color: red; } 

but there way same effect in html?

so

<div style="color: black;"></div> 

i know can js, wanted know if there hack it.. , no "duplicate" question did not contain answer looking for, keep in mind 4 years ago.

pseudo classes not allowed use inline css, short answer no, cannot trying achieve.

consider using <style> tags @ document level, or can use javascript if want to..

<a href="#" onmouseover = "this.style.color = '#000'"              onmouseout  = "this.style.color = '#f00'">hi</a> 

demo

and commented, still answer no, using html5/css3 there's no way can use pseudo classes inline.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -