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

SVG の <tspan> 要素は、 {{SVGElement('text')}} 要素内にあるサブテキストやその他の <tspan> 要素を定義します。これにより、必要に応じてサブテキストのスタイルや位置を調整することができます。

+ +
+ + +
<svg viewBox="0 0 240 40" xmlns="http://www.w3.org/2000/svg">
+  <style>
+    text  { font: italic 12px serif; }
+    tspan { font: bold 10px sans-serif; fill: red; }
+  </style>
+
+  <text x="10" y="30" class="small">
+    You are
+    <tspan>not</tspan>
+    a banana!
+  </text>
+</svg>
+ +

{{EmbedLiveSample('Example', 100, '100%')}}

+
+ +

属性

+ +
+
{{SVGAttr("x")}}
+
テキストのベースラインの開始点の X 座標です。
+ 値の型: <length>|<percentage> ; 既定値: none; Animatable: yes
+
{{SVGAttr("y")}}
+
テキストのベースラインの開始点の Y 座標です。
+ 値の型: <length>|<percentage> ; 既定値: none; Animatable: yes
+
{{SVGAttr("dx")}}
+
テキストの位置を直前のテキスト要素から水平方向にずらします。
+ 値の型: <length>|<percentage> ; Default value: none; Animatable: yes
+
{{SVGAttr("dy")}}
+
テキストの位置を直前のテキスト要素から垂直方向にずらします。
+ 値の型: <length>|<percentage> ; 既定値: none; Animatable: yes
+
{{SVGAttr("rotate")}}
+
それぞれの文字の向きを回転します。文字ごとに個別に回転させることができます。
+ 値の型: <list-of-number> ; 既定値: none; Animatable: yes
+
{{SVGAttr("lengthAdjust")}}
+
テキストをtextLength 属性で定義された幅に合わせるために伸縮する方法です。
+ 値の型: spacing|spacingAndGlyphs; 既定値: spacing; Animatable: yes
+
{{SVGAttr("textLength")}}
+
テキストを伸縮して合わせる幅です。
+ 値の型: <length>|<percentage> ; 既定値: none; Animatable: yes
+
+ +

グローバル属性

+ +
+
コア属性
+
特に: {{SVGAttr('id')}}, {{SVGAttr('tabindex')}}
+
スタイル属性
+
{{SVGAttr('class')}}, {{SVGAttr('style')}}
+
条件処理属性
+
特に: {{SVGAttr('requiredExtensions')}}, {{SVGAttr('systemLanguage')}}
+
Event Attributes
+
グローバルイベント属性, グラフィックイベント属性
+
プレゼンテーション属性
+
特に: {{SVGAttr('clip-path')}}, {{SVGAttr('clip-rule')}}, {{SVGAttr('color')}}, {{SVGAttr('color-interpolation')}}, {{SVGAttr('color-rendering')}}, {{SVGAttr('cursor')}}, {{SVGAttr('display')}}, {{SVGAttr('dominant-baseline')}}, {{SVGAttr('fill')}}, {{SVGAttr('fill-opacity')}}, {{SVGAttr('fill-rule')}}, {{SVGAttr('filter')}}, {{SVGAttr('mask')}}, {{SVGAttr('opacity')}}, {{SVGAttr('pointer-events')}}, {{SVGAttr('shape-rendering')}}, {{SVGAttr('stroke')}}, {{SVGAttr('stroke-dasharray')}}, {{SVGAttr('stroke-dashoffset')}}, {{SVGAttr('stroke-linecap')}}, {{SVGAttr('stroke-linejoin')}}, {{SVGAttr('stroke-miterlimit')}}, {{SVGAttr('stroke-opacity')}}, {{SVGAttr('stroke-width')}}, {{SVGAttr('text-anchor')}}, {{SVGAttr("transform")}}, {{SVGAttr('vector-effect')}}, {{SVGAttr('visibility')}}
+
Aria 属性
+
aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, aria-checked, aria-colcount, aria-colindex, aria-colspan, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role
+
+ +

使用場面

+ +

{{svginfo}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('SVG2', 'text.html#TextElement', '<tspan>')}}{{Spec2('SVG2')}}
{{SpecName('SVG1.1', 'text.html#TSpanElement', '<tspan>')}}{{Spec2('SVG1.1')}}初回定義
+ +

ブラウザーの互換性

+ + + +

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

-- cgit v1.2.3-54-g00ecf