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

id 属性は要素に固有の名前を割り当てます。

+ +

すべての要素がこの属性を使用します。

+ +
+
<svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
+  <style type="text/css">
+    <![CDATA[
+      #smallRect {
+        stroke: #000066;
+        fill: #00cc00;
+      }
+    ]]>
+  </style>
+
+  <rect id="smallRect" x="10" y="10" width="100" height="100" />
+</svg>
+
+ +

{{EmbedLiveSample("topExample", "120", "120")}}

+
+ +

使用上の注意

+ + + + + + + + + + + + + + + + +
<id>
既定値None
アニメーションいいえ
+ +
+
<id>
+
+

要素の ID を指定します。 ID はノードツリー内で固有でなければならず、空文字列であってはならず、ホワイトスペース文字を含んではなりません。

+ +
+

注: URL の対象フラグメントとして使用されるときに id の値に SVG view 仕様書として解釈される値 (例えば MyDrawing.svg#svgView(viewBox(0,200,1000,1000))) や、基本メディアフラグメントを使用しないでください。

+
+ +

XML 文書内で妥当でなければなりません。独立した SVG 文書は XML 1.0 の構文を使用しており、有効な ID は指定された文字 (文字、数字、いくつかの句読点) のみを含み、数字、フルストップ (.) 文字、ハイフンマイナス (-) 文字で始まらないことを指定しています。

+
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("SVG2", "struct.html#IDAttribute", "id")}}{{Spec2("SVG2")}}Defines the allowed values in more detail.
{{SpecName("SVG1.1", "struct.html#IDAttribute", "id")}}{{Spec2("SVG1.1")}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("svg.attributes.style.class")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf