The :any-link
CSS pseudo-class represents an element that acts as the source anchor of a hyperlink independent of whether it has been visited, that is, it matches every <a>
, <area>
or <link>
elements with an href
attribute. So, it matches all elements that match :link
or :visited
.
:any-link( style properties ) { style properties }
:any-link { color: green; font-weight: bold; } :-moz-any-link { color: green; font-weight: bold; } :-webkit-any-link { color: green; font-weight: bold; }
<a href="https://mozilla.org">Different page</a> <a href="#">Anchor</a> <map name="primary"> <area shape="circle" coords="50,50,25" href="another.html" /> <area shape="default" nohref /> </map>
Specification | Status | Comment |
---|---|---|
Selectors Level 4 The definition of ':any-link' in that specification. | Working Draft | Initial definition |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes)-webkit |
(Yes)-moz 50.0 (50.0) | ? | ? | ? |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | ? |
(Yes)-moz 50.0 (50.0) | ? | ? | ? |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link