diff options
| author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
|---|---|---|
| committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
| commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
| tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/css/_colon_any-link/index.html | |
| parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
| download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip | |
initial commit
Diffstat (limited to 'files/fr/web/css/_colon_any-link/index.html')
| -rw-r--r-- | files/fr/web/css/_colon_any-link/index.html | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/files/fr/web/css/_colon_any-link/index.html b/files/fr/web/css/_colon_any-link/index.html new file mode 100644 index 0000000000..3478e545af --- /dev/null +++ b/files/fr/web/css/_colon_any-link/index.html @@ -0,0 +1,76 @@ +--- +title: ':any-link' +slug: 'Web/CSS/:any-link' +tags: + - CSS + - Experimental + - Pseudo-classe + - Reference +translation_of: 'Web/CSS/:any-link' +--- +<div>{{CSSRef}}</div> + +<p>La pseudo-classe <strong><code>:any-link</code></strong> permet de représenter un élément qui agit comme la source de l'ancre d'un hyperlien (qu'il ait été visité ou non). Elle permet donc de cibler les éléments {{HTMLElement("a")}}, {{HTMLElement("area")}} ou {{HTMLElement("link")}} avec un attribut <code>href</code>. Autrement dit, elle cible les éléments qui correspondent à {{cssxref(":link")}} ou à {{cssxref(":visited")}}.</p> + +<pre class="brush: css no-line-numbers language-css">/* cible tous les éléments qui seraient ciblés par */ +/* :link ou :visited */ +:any-link { + color: green; + font-weight: bold; +}</pre> + +<h2 id="Syntaxe">Syntaxe</h2> + +<pre class="syntaxbox">{{csssyntax}} +</pre> + +<h2 id="Exemples">Exemples</h2> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css">:any-link { + color: green; + font-weight: bold; +} + +/* Pour les navigateurs WebKit */ +:-webkit-any-link { + color: green; + font-weight: bold; +} +</pre> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html"><a href="https://mozilla.org">Une page différente</a><br> +<a href="#">Une ancre</a><br> +<a>Un lien sans cible (n'est pas mis en forme)</a></pre> + +<h3 id="Résultat">Résultat</h3> + +<p>{{EmbedLiveSample("Exemples","100%","100%")}}</p> + +<h2 id="Spécifications">Spécifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">État</th> + <th scope="col">Commentaires</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("CSS4 Selectors", "#the-any-link-pseudo", ":any-link")}}</td> + <td>{{Spec2('CSS4 Selectors')}}</td> + <td>Définition initiale.</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> + +<p class="hidden">Les données de compatibilité de cette page ont été générées à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à proposer une <em>pull request</em> sur le dépôt <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</p> + +<p>{{Compat("css.selectors.any-link")}}</p> |
