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/fill-opacity/index.html | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 files/fr/web/svg/attribute/fill-opacity/index.html (limited to 'files/fr/web/svg/attribute/fill-opacity/index.html') diff --git a/files/fr/web/svg/attribute/fill-opacity/index.html b/files/fr/web/svg/attribute/fill-opacity/index.html new file mode 100644 index 0000000000..3991e07b5d --- /dev/null +++ b/files/fr/web/svg/attribute/fill-opacity/index.html @@ -0,0 +1,91 @@ +--- +title: fill-opacity +slug: Web/SVG/Attribute/fill-opacity +tags: + - SVG + - SVG Attribute +translation_of: Web/SVG/Attribute/fill-opacity +--- +
{{SVGRef}}
+ +

L'attribut fill-opacity définit l'opacité du remplissage (couleur, dégradé, motif, etc) appliqué à une forme.

+ +

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

+ +

Cet attribut peut être appliqué sur tous les éléments, 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')}}, et {{SVGElement('tspan')}}

+ +
+ + +
<svg viewBox="0 0 400 100" xmlns="http://www.w3.org/2000/svg">
+  <!-- Opacité par défaut: 1 -->
+  <circle cx="50" cy="50" r="40" />
+
+  <!-- Définit l'opacité avec un nombre -->
+  <circle cx="150" cy="50" r="40"
+          fill-opacity="0.7" />
+
+  <!-- Définit l'opaité avec un pourcentage -->
+  <circle cx="250" cy="50" r="40"
+          fill-opacity="50%" />
+
+  <!-- Définit l'opacité avec une propriété CSS -->
+  <circle cx="350" cy="50" r="40"
+          style="fill-opacity: .25;" />
+</svg>
+ +

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

+
+ +

Notes d'utilisation

+ + + + + + + + + + + + + + + + +
Valeur[0-1] | <percentage>
Valeur par défaut1
AnimationOui
+ +

Note: SVG2 introduit les valeurs en pourcentage pour fill-opacity. Cependant,  ce n'est pas souvent pris en charge pour le moment (Voir {{anch('Compatibilité des navigateurs')}} ci-dessous). Il est par conséquent recommandé d'utiiser les valeurs de l'intervalle [0-1].

+ +

Compatibilité des navigateurs

+ + + +

{{Compat("svg.attributes.presentation.fill-opacity")}}

+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName("SVG2", "painting.html#FillOpacityProperty", "fill-opacity")}}{{Spec2("SVG2")}}Définition pour les formes et le texte.
{{SpecName("SVG1.1", "painting.html#FillOpacityProperty", "fill-opacity")}}{{Spec2("SVG1.1")}}Définition initiale pour les formes et le texte.
-- cgit v1.2.3-54-g00ecf