html - Is there a way to change css on hover with (style="")? -
this question has answer here:
- how write a:hover in inline css? 17 answers
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>
and commented, still answer no, using html5/css3 there's no way can use pseudo classes inline.
Comments
Post a Comment