blob: 389e54aec35c1fff2678bd34fec2f6885d33b5f6 (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
---
title: <radialGradient>
slug: Web/SVG/Element/radialGradient
tags:
- Element
- SVG
- SVG Dégradé
translation_of: Web/SVG/Element/radialGradient
---
<div>{{SVGRef}}</div>
<div>L'élément <a href="/fr/docs/Web/SVG">SVG </a><strong><code><radialGradient></code></strong> permet de définir un dégradé radial afin de dessiner un contour, ou de remplir des éléments SVG.</div>
<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="https://developer.mozilla.org/fr/docs/Web/SVG/Attribute#Attributs_de_base">Attributs de base</a> »</li>
<li><a href="https://developer.mozilla.org/fr/docs/Web/SVG/Attribute#Attributs_de_pr%C3%A9sentation">Références des attributs SVG</a> »</li>
<li><a href="https://developer.mozilla.org/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("cx")}}</li>
<li>{{SVGAttr("cy")}}</li>
<li>{{SVGAttr("r")}}</li>
<li>{{SVGAttr("fx")}}</li>
<li>{{SVGAttr("fy")}}</li>
<li>{{SVGAttr("fr")}}</li>
<li>{{SVGAttr("spreadMethod")}}</li>
<li>{{SVGAttr("xlink:href")}}</li>
</ul>
<h2 id="DOM_Interface">DOM Interface</h2>
<p>Cet élément implémente l'interface {{domxref("SVGRadialGradientElement")}}.</p>
<h2 id="Exemple">Exemple</h2>
<h3 id="SVG">SVG</h3>
<pre class="brush: html"><svg width="120" height="120" viewBox="0 0 120 120"
xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="exampleGradient">
<stop offset="10%" stop-color="gold"/>
<stop offset="95%" stop-color="green"/>
</radialGradient>
</defs>
<circle fill="url(#exampleGradient)" cx="60" cy="60" r="50"/>
</svg></pre>
<h3 id="Résultat">Résultat</h3>
<p>{{ EmbedLiveSample('Exemple', 120, 120, '', 'Web/SVG/Element/radialGradient') }}</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#RadialGradients', '<radialGradient>')}}</td>
<td>{{Spec2('SVG2')}}</td>
<td>Added <code>fr</code> attribute</td>
</tr>
<tr>
<td>{{SpecName('SVG1.1', 'pservers.html#RadialGradients', '<radialGradient>')}}</td>
<td>{{Spec2('SVG1.1')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Chrome</th>
<th>Edge</th>
<th>Firefox (Gecko)</th>
<th>IE</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatChrome('1.0')}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatGeckoDesktop('1.8')}}</td>
<td>{{CompatIE('9.0')}}</td>
<td>{{CompatOpera('9.0')}}</td>
<td>{{CompatSafari('3.0.4')}}<sup>[1]</sup></td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>Feature</th>
<th>Android</th>
<th>Edge</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Phone</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>Basic support</td>
<td>{{CompatAndroid('3.0')}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatGeckoMobile('1.8')}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatVersionUnknown}}</td>
<td>{{CompatSafari('3.0.4')}}<sup>[1]</sup></td>
</tr>
</tbody>
</table>
</div>
<p>Le tableau est basé sur <a href="/en-US/docs/Web/SVG/Compatibility_sources">ces ressources</a>.</p>
<p>[1] WebKit ne supporte pas l'interpolation des couleurs ({{WebKitBug("6034")}}).</p>
<h2 id="Voir_aussi">Voir aussi</h2>
<ul>
<li>{{SVGElement("linearGradient")}}</li>
</ul>
|