我知道将CSS样式直接嵌入到它们会影响的HTML标记中会破坏CSS的许多目的,但是有时对于调试目的很有用,例如:
<p style="font-size: 24px">asdf</p>
嵌入规则的语法是什么:
a:hover {text-decoration: underline;}
放入A标签的样式属性中?显然不是这个...
<a href="foo" style="text-decoration: underline">bar</a>
...因为这将一直适用,而不是仅在悬停期间适用。