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

stroke-dasharray属性は、 輪郭を描くために使用される、破線や間隔のある線のパターンを定義するプレゼンテーション属性です。

+ +

Note: プレゼンテーション属性として、stroke-dasharray属性は、CSSプロパティとして使用することができます。

+ +

プレゼンテーション属性として、それはいくつかの要素に適用することができますが、つぎの12個の要素にのみ効果があります。

+ +
+ +
+ +
+ + +
<svg viewBox="0 0 30 10" xmlns="http://www.w3.org/2000/svg">
+  <!-- No dashes nor gaps -->
+  <line x1="0" y1="1" x2="30" y2="1" stroke="black" />
+
+  <!-- Dashes and gaps of the same size -->
+  <line x1="0" y1="3" x2="30" y2="3" stroke="black"
+          stroke-dasharray="4" />
+
+  <!-- Dashes and gaps of different sizes -->
+  <line x1="0" y1="5" x2="30" y2="5" stroke="black"
+          stroke-dasharray="4 1" />
+
+  <!-- Dashes and gaps of various sizes with an odd number of values -->
+  <line x1="0" y1="7" x2="30" y2="7" stroke="black"
+          stroke-dasharray="4 1 2" />
+
+  <!-- Dashes and gaps of various sizes with an even number of values -->
+  <line x1="0" y1="9" x2="30" y2="9" stroke="black"
+          stroke-dasharray="4 1 2 3" />
+</svg>
+
+ +

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

+
+ +

Usage notes

+ + + + + + + + + + + + + + + + +
Valuenone | <dasharray>
Default valuenone
AnimatableYes
+ +
+
<dasharray>
+
+

A list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps.

+ +

If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, 5,3,2 is equivalent to 5,3,2,5,3,2.

+
+
+ +

Browser compatibility

+ + + +

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

+ +

Specification

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("SVG2", "painting.html#StrokeDasharrayProperty", "stroke-dasharray")}}{{Spec2("SVG2")}}Definition for shapes and texts
{{SpecName("SVG1.1", "painting.html#StrokeDasharrayProperty", "stroke-dasharray")}}{{Spec2("SVG1.1")}}Initial definition for shapes and texts
-- cgit v1.2.3-54-g00ecf