aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/svg/attribute/clip-path
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/svg/attribute/clip-path
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/svg/attribute/clip-path')
-rw-r--r--files/fr/web/svg/attribute/clip-path/index.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/files/fr/web/svg/attribute/clip-path/index.html b/files/fr/web/svg/attribute/clip-path/index.html
new file mode 100644
index 0000000000..11078c3e3f
--- /dev/null
+++ b/files/fr/web/svg/attribute/clip-path/index.html
@@ -0,0 +1,103 @@
+---
+title: clip-path
+slug: Web/SVG/Attribute/clip-path
+tags:
+ - SVG
+ - SVG Attribute
+translation_of: Web/SVG/Attribute/clip-path
+---
+<div>{{SVGRef}}</div>
+
+<p>L'attribut <strong><code>clip-path</code></strong> permet d'appliquer un détourage à un élément.</p>
+
+<p class="note"><strong>Note:</strong> <code>clip-path</code> étant un attribut de présentation, il peut être utilisé comme propriété CSS.</p>
+
+<p>Cet attribut peut être appliqué sur tous les éléments, en revanche il n'aura d'effet que sur les éléments suivants: {{SVGElement('a')}}, {{SVGElement('circle')}}, {{SVGElement('clipPath')}}, {{SVGElement('ellipse')}}, {{SVGElement('g')}}, {{SVGElement('glyph')}}, {{SVGElement('image')}}, {{SVGElement('line')}}, {{SVGElement('marker')}}, {{SVGElement('mask')}}, {{SVGElement('path')}}, {{SVGElement('pattern')}}, {{SVGElement('polygon')}}, {{SVGElement('polyline')}}, {{SVGElement('rect')}}, {{SVGElement('svg')}}, {{SVGElement('symbol')}}, {{SVGElement('text')}}, {{SVGElement('use')}}</p>
+
+<div id="topExample">
+<div class="hidden">
+<pre class="brush: css">html,body,svg { height:100% }</pre>
+</div>
+
+<pre class="brush: html">&lt;svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"&gt;
+ &lt;clipPath id="myClip" clipPathUnits="objectBoundingBox"&gt;
+ &lt;circle cx=".5" cy=".5" r=".5" /&gt;
+ &lt;/clipPath&gt;
+
+ &lt;!-- En haut à gauche: Applique un détourage précédemment crée --&gt;
+ &lt;rect x="1" y="1" width="8" height="8" stroke="green"
+ clip-path="url(#myClip)" /&gt;
+
+ &lt;!-- En haut à droite: Applique un détourage sur fill-box via une forme CSS.
+ Revient à créer un détourage avec clipPathUnits="objectBoundingBox" --&gt;
+ &lt;rect x="11" y="1" width="8" height="8" stroke="green"
+ clip-path="circle() fill-box" /&gt;
+
+ &lt;!-- En bas à gauche: Applique un détourage sur stroke-box via une forme CSS. --&gt;
+ &lt;rect x="1" y="11" width="8" height="8" stroke="green"
+ clip-path="circle() stroke-box" /&gt;
+
+ &lt;!-- En bas à droite: Applique un détourage sur view-box via une forme CSS.
+ Revient à créer un détourage avec clipPathUnits="userSpaceOnUse" --&gt;
+ &lt;rect x="11" y="11" width="8" height="8" stroke="green"
+ clip-path="circle() view-box" /&gt;
+&lt;/svg&gt;</pre>
+
+<p>{{EmbedLiveSample('topExample', '100%', 200)}}</p>
+</div>
+
+<h2 id="Notes_d'usage">Notes d'usage</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="row">Valeur</th>
+ <td>{{cssxref('url')}} | [ {{cssxref('basic-shape')}} || &lt;geometry-box&gt; ] | <code>none</code></td>
+ </tr>
+ <tr>
+ <th scope="row">Valeur par défaut</th>
+ <td><code>none</code></td>
+ </tr>
+ <tr>
+ <th scope="row">Animation</th>
+ <td>Oui</td>
+ </tr>
+ </tbody>
+</table>
+
+<dl>
+ <dt>&lt;geometry-box&gt;</dt>
+ <dd>une information supplémentaire pour dire comment une {{cssxref('basic-shape', 'forme CSS')}} est appliquée à un élément: <code>fill-box</code> indique d'utiliser la zone de sélection de l'objet ; <code>stroke-box</code> d'utiliser la zone de sélection de l'objet en prenant en plus le contour de l'élément; <code>view-box</code> d'utiliser le  document SVG parent.</dd>
+</dl>
+
+<p class="note"><strong>Note:</strong> Pour plus d'informations sur la syntaxe de clip-path, voir la propriété CSS {{cssxref('clip-path')}}.</p>
+
+<h2 id="Browser_Compatibility" name="Browser_Compatibility">Compatibilité des navigateurs</h2>
+
+<p class="hidden">Le tableau de compatibilité de cette page a été généré à partir de données structurées. Si vous souhaitez contribuer à ces données, n'hésitez pas à envoyer une <em>pull request</em> sur <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a>.</p>
+
+<p>{{Compat("svg.attributes.presentation.clip-path")}}</p>
+
+<h2 id="Spécifications">Spécifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("CSS Masks", "#the-clip-path", 'clip-path')}}</td>
+ <td>{{Spec2('CSS Masks')}}</td>
+ <td>Étend son application aux éléments HTML. La propriété <code>clip-path</code> remplace la propriété {{cssxref("clip")}} dépréciée.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('SVG1.1', 'masking.html#ClipPathProperty', 'clip-path')}}</td>
+ <td>{{Spec2('SVG1.1')}}</td>
+ <td>Définition initiale (s'applique sur les éléments SVG uniquement).</td>
+ </tr>
+ </tbody>
+</table>