aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/svg/element/lineargradient/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/svg/element/lineargradient/index.html')
-rw-r--r--files/fr/web/svg/element/lineargradient/index.html100
1 files changed, 100 insertions, 0 deletions
diff --git a/files/fr/web/svg/element/lineargradient/index.html b/files/fr/web/svg/element/lineargradient/index.html
new file mode 100644
index 0000000000..360947e8e9
--- /dev/null
+++ b/files/fr/web/svg/element/lineargradient/index.html
@@ -0,0 +1,100 @@
+---
+title: <linearGradient>
+slug: Web/SVG/Element/linearGradient
+tags:
+ - Element
+ - Reference
+ - SVG
+ - SVG Gradient
+translation_of: Web/SVG/Element/linearGradient
+---
+<div>{{SVGRef}}</div>
+
+<p>L'élément <strong><code>&lt;linearGradient&gt;</code></strong> permet de définir des dégradés linéaires, qui pourront être utilisés comme remplissage ou contour des éléments SVG.</p>
+
+<h2 id="Contexte_d'utilisation">Contexte d'utilisation</h2>
+
+<p>{{svginfo}}</p>
+
+<h2 id="Attributs">Attributs</h2>
+
+<h3 id="Attributs_globaux">Attributs globaux</h3>
+
+<ul>
+ <li><a href="/fr/docs/Web/SVG/Attribute#Attributs_de_base">Attributs de base</a></li>
+ <li><a href="/fr/docs/Web/SVG/Attribute#Attributs_de_présentation">Attributs de présentation</a></li>
+ <li><a href="/fr/docs/Web/SVG/Attribute#Attributs_XLink">Attributs Xlink</a></li>
+ <li>{{SVGAttr("class")}}</li>
+ <li>{{SVGAttr("style")}}</li>
+ <li>{{SVGAttr("externalResourcesRequired")}}</li>
+</ul>
+
+<h3 id="Attributs_spécifiques">Attributs spécifiques</h3>
+
+<ul>
+ <li>{{SVGAttr("gradientUnits")}}</li>
+ <li>{{SVGAttr("gradientTransform")}}</li>
+ <li>{{SVGAttr("x1")}}</li>
+ <li>{{SVGAttr("y1")}}</li>
+ <li>{{SVGAttr("x2")}}</li>
+ <li>{{SVGAttr("y2")}}</li>
+ <li>{{SVGAttr("spreadMethod")}}</li>
+ <li>{{SVGAttr("xlink:href")}}</li>
+</ul>
+
+<h2 id="Interface_DOM">Interface DOM</h2>
+
+<p>Cet élément implémente l'interface {{domxref("SVGLinearGradientElement")}}.</p>
+
+<h2 id="Exemple">Exemple</h2>
+
+<pre class="brush: html">&lt;svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"&gt;
+ &lt;defs&gt;
+ &lt;linearGradient id="MyGradient"&gt;
+ &lt;stop offset="5%" stop-color="green"/&gt;
+ &lt;stop offset="95%" stop-color="gold"/&gt;
+ &lt;/linearGradient&gt;
+ &lt;/defs&gt;
+
+ &lt;rect fill="url(#MyGradient)"
+ x="10" y="10" width="100" height="100"/&gt;
+&lt;/svg&gt;</pre>
+
+<p>{{EmbedLiveSample("Exemple", 120, 120, "https://mdn.mozillademos.org/files/10061/svg-lineargradient.png")}}</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('SVG2', 'pservers.html#LinearGradientElement', '&lt;linearGradient&gt;')}}</td>
+ <td>{{Spec2('SVG2')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('SVG1.1', 'pservers.html#LinearGradients', '&lt;linearGradient&gt;')}}</td>
+ <td>{{Spec2('SVG1.1')}}</td>
+ <td>Définition initiale</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilité_des_navigateurs">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.elements.linearGradient")}}</p>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>{{SVGElement("radialGradient")}}</li>
+ <li>{{SVGElement("stop")}}</li>
+</ul>