<a>
的正确样式顺序是什么?元素(链接、已访问、悬停、事件)。通过提供不同的组合,如 LVHA、LAHV,所有这些都令人困惑。任何人都可以指定正确的顺序吗?
最佳答案
链接已访问悬停
引用自CSS specification :
a:link { color: red } /* unvisited links */ a:visited { color: blue } /* visited links */ a:hover { color: yellow } /* user hovers */ a:active { color: lime } /* active links */
Note that the A:hover must be placed after the A:link and A:visited rules, since otherwise the cascading rules will hide the 'color' property of the A:hover rule. Similarly, because A:active is placed after A:hover, the active color (lime) will apply when the user both activates and hovers over the A element.
关于html - css中的链接顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1536810/