diff options
author | julieng <julien.gattelier@gmail.com> | 2021-11-01 07:51:27 +0100 |
---|---|---|
committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-11-07 11:57:29 +0100 |
commit | 7040e4bc9c98e0c50ce903a5cbeeabeda2ed908a (patch) | |
tree | 98beab4363e778deb9e251db56c2a5b1248f2697 /files/fr/web/svg/attribute/stroke-dashoffset/index.md | |
parent | c5054b32e0e496608030b5148ebba6d76db8ba7f (diff) | |
download | translated-content-7040e4bc9c98e0c50ce903a5cbeeabeda2ed908a.tar.gz translated-content-7040e4bc9c98e0c50ce903a5cbeeabeda2ed908a.tar.bz2 translated-content-7040e4bc9c98e0c50ce903a5cbeeabeda2ed908a.zip |
move *.html to *.md
Diffstat (limited to 'files/fr/web/svg/attribute/stroke-dashoffset/index.md')
-rw-r--r-- | files/fr/web/svg/attribute/stroke-dashoffset/index.md | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/files/fr/web/svg/attribute/stroke-dashoffset/index.md b/files/fr/web/svg/attribute/stroke-dashoffset/index.md new file mode 100644 index 0000000000..071512cffe --- /dev/null +++ b/files/fr/web/svg/attribute/stroke-dashoffset/index.md @@ -0,0 +1,114 @@ +--- +title: stroke-dashoffset +slug: Web/SVG/Attribute/stroke-dashoffset +tags: + - SVG + - SVG Attribute +translation_of: Web/SVG/Attribute/stroke-dashoffset +--- +<div>{{SVGRef}}</div> + +<p>L'attribut <strong><code>stroke-dashoffset</code></strong> décale la position de départ des pointillés sur les lignes SVG.</p> + +<div class="note"> + <p><strong>Note :</strong> <code>stroke-dashoffset</code> étant un attribut de présentation, il peut être utilisé comme propriété CSS.</p> +</div> + +<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('altGlyph')}}, {{SVGElement('circle')}}, {{SVGElement('ellipse')}}, {{SVGElement('path')}}, {{SVGElement('polygon')}}, {{SVGElement('polyline')}}, {{SVGElement('rect')}}, {{SVGElement('text')}}, {{SVGElement('textPath')}}, {{SVGElement('tref')}}, and {{SVGElement('tspan')}}</p> + +<h2>Exemple</h2> + +<pre class="brush: css hidden">html,body,svg { height:100% }</pre> + + +<pre class="brush: html"><svg viewBox="-3 0 33 10" xmlns="http://www.w3.org/2000/svg"> + <!-- Pas de tiret --> + <line x1="0" y1="1" x2="30" y2="1" stroke="black" /> + + <!-- Pas de décalage --> + <line x1="0" y1="3" x2="30" y2="3" stroke="black" + stroke-dasharray="3 1" /> + + <!-- + Le début des tirets est décalé + de 3 unités vers la gauche + --> + <line x1="0" y1="5" x2="30" y2="5" stroke="black" + stroke-dasharray="3 1" + stroke-dashoffset="3" /> + + <!-- + Le début des tirets est décalé + de 3 unités vers la droite (-3) + --> + <line x1="0" y1="7" x2="30" y2="7" stroke="black" + stroke-dasharray="3 1" + stroke-dashoffset="-3" /> + + <!-- + Le début des tirets est décalé + de 1 unité vers la gauche + ce qui affiche la même chose que l'exemple précédent + --> + <line x1="0" y1="9" x2="30" y2="9" stroke="black" + stroke-dasharray="3 1" + stroke-dashoffset="1" /> + + <!-- + Lignes rouges pour indiquer la position + de départ des tirets + --> + <path d="M0,5 h-3 M0,7 h3 M0,9 h-1" stroke="rgba(255,0,0,.5)" /> +</svg> +</pre> + +<p>{{EmbedLiveSample('exemple', '100%', 200)}}</p> + +<h2 id="Notes_d'usage">Notes d'usage</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="row">Valeur</th> + <td><strong><a href="/fr/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage"><percentage></a></strong> | <strong><a href="/fr/SVG/Content_type#Length" title="en/SVG/Content_type#Length"><length></a></strong></td> + </tr> + <tr> + <th scope="row">Valeur par défaut</th> + <td><code>0</code></td> + </tr> + <tr> + <th scope="row">Animation</th> + <td>Oui</td> + </tr> + </tbody> +</table> + +<p>Le décalage est généralement exprimé en unités résolues par {{SVGAttr('pathLength')}} mais si un <a href="/fr/SVG/Content_type#Percentage" title="en/SVG/Content_type#Percentage"><percentage></a> est utilisé, alors la valeur est résolue en pourcentage du viewport.</p> + +<h2 id="Browser_Compatibility">Compatibilité des navigateurs</h2> + +<p>{{Compat("svg.attributes.presentation.stroke-dashoffset")}}</p> + +<h2 id="Spécification">Spécification</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", "painting.html#StrokeDashoffsetProperty", "stroke-dashoffset")}}</td> + <td>{{Spec2("SVG2")}}</td> + <td>Définition pour les formes et le texte</td> + </tr> + <tr> + <td>{{SpecName("SVG1.1", "painting.html#StrokeDashoffsetProperty", "stroke-dashoffset")}}</td> + <td>{{Spec2("SVG1.1")}}</td> + <td>Définition initiale pour les formes et le texte</td> + </tr> + </tbody> +</table> |