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/element/image/index.html | 102 ++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 files/ja/web/svg/element/image/index.html (limited to 'files/ja/web/svg/element/image') diff --git a/files/ja/web/svg/element/image/index.html b/files/ja/web/svg/element/image/index.html new file mode 100644 index 0000000000..874f1d59ac --- /dev/null +++ b/files/ja/web/svg/element/image/index.html @@ -0,0 +1,102 @@ +--- +title: +slug: Web/SVG/Element/image +tags: + - Element + - Reference + - SVG + - SVG Graphics +translation_of: Web/SVG/Element/image +--- +
{{SVGRef}}
+ +

The <image> は SVG の要素で、 SVG 文書内に画像を含めます。これは{{glossary("raster image", "ラスター画像")}}ファイルや他の SVG ファイルを表示することができます。

+ +

SVG ソフトウェアが対応する必要がある画像形式は {{glossary("JPEG")}}, {{glossary("PNG")}}, および他の SVG ファイルです。アニメーション {{glossary("GIF")}} の動作は未定義です。

+ +

<image> で表示される SVG ファイルは画像として扱われます。外部リソースは読み込まれず、 {{cssxref(":visited")}} のスタイルは適用されず、ユーザーと対話することはできません。動的な SVG 要素を埋め込みたいのであれば、 {{SVGElement("use")}} を外部 URL で使用してください。 SVG ファイルを含めてその中でスクリプトを実行するのであれば、 {{HTMLElement("object")}} を {{SVGElement("foreignObject")}} の中で使用してください。

+ +
+

注: HTML 仕様書は、解釈時に <image> を {{HTMLElement("img")}} の別名として定義しています。この仕様書の要素とその動作は SVG 文書またはインライン SVG 内のみのものです。

+
+ +

使用場所

+ +

{{svginfo}}

+ +

属性

+ +

グローバル属性

+ + + +

固有の属性

+ + + +

DOM インターフェイス

+ +

<image> は {{domxref("SVGImageElement")}} インターフェイスを実装しています。

+ +

+ +

SVG 内における PNG 画像の基本的な描画:

+ +

SVG

+ +
<svg width="200" height="200"
+  xmlns="http://www.w3.org/2000/svg">
+  <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="200" width="200"/>
+</svg>
+
+ +

結果

+ +

{{EmbedLiveSample("Example", 250, 260)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('SVG2', 'embedded.html#ImageElement', '<image>')}}{{Spec2('SVG2')}}height および width を省略可能とした
{{SpecName('SVG1.1', 'struct.html#ImageElement', '<image>')}}{{Spec2('SVG1.1')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("svg.elements.image")}}

-- cgit v1.2.3-54-g00ecf