这篇翻译不完整。请帮忙从英语翻译这篇文章

 

这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。

:any-link  CSS 伪类 选择器代表一个有链接锚点的元素,而不管它是否被访问过,也就是说,它会匹配每一个有 href 属性的 <a><area> 或 <link> 元素。因此,它会匹配到所有的 :link 或 :visited

/* 选中任意匹配 :link 和 :visited 元素*/
:any-link {
  color: green;
}

语法

:any-link

示例

HTML

<a href="https://example.com">External link</a><br>
<a href="#">Internal target link</a><br>
<a>Placeholder link (won't get styled)</a>

CSS

a:any-link {
  border: 1px solid blue;
  color: orange;
}

/* WebKit browsers */
a:-webkit-any-link {
  border: 1px solid blue;
  color: orange;
}

Specifications

Specification Status Comment
Selectors Level 4
:any-link
Working Draft Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
:any-linkChrome Full support 65
Full support 65
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Edge No support NoFirefox Full support 50
Full support 50
No support 1 — 50
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
IE No support NoOpera Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari Full support 9
Full support 9
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
WebView Android Full support 65
Full support 65
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Chrome Android Full support 65
Full support 65
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Edge Mobile No support NoFirefox Android Full support 50
Full support 50
No support 4 — 50
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Opera Android Full support Yes
Prefixed
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Safari iOS Full support 9
Full support 9
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: -webkit-
Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

文档标签和贡献者

标签: 
此页面的贡献者: mdnwebdocs-bot, walacewang, anjia
最后编辑者: mdnwebdocs-bot,