From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/svg/attribute/stroke/index.html | 93 ++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 files/fr/web/svg/attribute/stroke/index.html (limited to 'files/fr/web/svg/attribute/stroke/index.html') diff --git a/files/fr/web/svg/attribute/stroke/index.html b/files/fr/web/svg/attribute/stroke/index.html new file mode 100644 index 0000000000..9e8c7fa1ba --- /dev/null +++ b/files/fr/web/svg/attribute/stroke/index.html @@ -0,0 +1,93 @@ +--- +title: stroke +slug: Web/SVG/Attribute/stroke +tags: + - Attribut SVG + - SVG +translation_of: Web/SVG/Attribute/stroke +--- +
{{SVGRef}}
+ +

L'attribut stroke définit la couleur (ou n'importe quelle méthode de remplissage, comme un gradient ou motif) a utiliser pour dessiner le contour d'une forme SVG.

+ +

Note: stroke étant un attribut de présentation, il peut être utilisé comme propriété CSS.

+ +

Cet attribut peut être appliqué à tout élément, en revanche il n'aura d'effet que sur les éléments suivants: {{SVGElement('altGlyph')}}, {{SVGElement('circle')}}, {{SVGElement('ellipse')}}, {{SVGElement('path')}}, {{SVGElement('polygon')}}, {{SVGElement('polyline')}}, {{SVGElement('rect')}}, {{SVGElement('text')}}, {{SVGElement('textPath')}}, {{SVGElement('tref')}}, and {{SVGElement('tspan')}}

+ +
+ + +
<svg viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg">
+
+  <!-- Simple trait de couleur -->
+  <circle cx="5" cy="5" r="4" fill="none"
+          stroke="green" />
+
+  <!-- Utiliser un degradé comme contour -->
+  <defs>
+    <linearGradient id="myGradient">
+      <stop offset="0%"   stop-color="green" />
+      <stop offset="100%" stop-color="white" />
+    </linearGradient>
+  </defs>
+  <circle cx="15" cy="5" r="4" fill="none"
+          stroke="url(#myGradient)" />
+</svg>
+
+ +

{{EmbedLiveSample('topExample', '100%', 200)}}

+
+ +

Notes d'usage

+ + + + + + + + + + + + + + + + +
Valeur<paint>
Valeur par défautnone
AnimationOui
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName("SVG2", "painting.html#StrokeProperty", "stroke")}}{{Spec2("SVG2")}}Définition pour les formes et le texte.
+ Ajoute context-fill et context-stroke.
{{SpecName("SVG1.1", "painting.html#StrokeProperty", "stroke")}}{{Spec2("SVG1.1")}}Définiton initiale pour les formes et le texte
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("svg.attributes.presentation.stroke")}}

+ +

Note: Pour plus d'informations sur les valeurs de context-stroke (et context-fill) à partir de documents HTML, voir la documentation pour la propriété non-standard {{cssxref("-moz-context-properties")}}.

-- cgit v1.2.3-54-g00ecf