aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/_colon_any-link/index.html
blob: 735063ac3812834b6c29f36e7de4fe16cd22d864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: ':any-link'
slug: 'Web/CSS/:any-link'
tags:
  - CSS
  - CSS 疑似クラス
  - Experimental
  - Reference
  - Web
  - セレクター
  - レイアウト
translation_of: 'Web/CSS/:any-link'
---
<div>{{CSSRef}}</div>

<p><a href="/ja/docs/Web/CSS">CSS</a><strong><code>:any-link</code></strong> <a href="/ja/docs/Web/CSS/Pseudo-classes">疑似クラス</a>セレクターは、訪問の有無とは独立したソースアンカーとして振る舞う要素を表します。言い換えれば、 <code>href</code> 属性を持つすべての {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("link")}} の各要素を選択します。つまり、 {{cssxref(":link")}} または {{cssxref(":visited")}} に一致するすべての要素を選択します。</p>

<pre class="brush: css no-line-numbers">/* :link または :visited に該当するすべての要素を選択 */
:any-link {
  color: green;
}</pre>

<h2 id="Syntax" name="Syntax">構文</h2>

{{csssyntax}}

<h2 id="Example" name="Example"></h2>

<h3 id="HTML">HTML</h3>

<pre class="brush: html">&lt;a href="https://example.com"&gt;External link&lt;/a&gt;&lt;br&gt;
&lt;a href="#"&gt;Internal target link&lt;/a&gt;&lt;br&gt;
&lt;a&gt;Placeholder link (won't get styled)&lt;/a&gt;</pre>

<h3 id="CSS">CSS</h3>

<pre class="brush: css">a:any-link {
  border: 1px solid blue;
  color: orange;
}

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

<h3 id="Result" name="Result">結果</h3>

<p>{{EmbedLiveSample('Example')}}</p>

<h2 id="Specifications" name="Specifications">仕様書</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">仕様書</th>
   <th scope="col">状態</th>
   <th scope="col">備考</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS4 Selectors", "#the-any-link-pseudo", ":any-link")}}</td>
   <td>{{Spec2('CSS4 Selectors')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

<p class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</p>

<p>{{Compat("css.selectors.any-link")}}</p>