Movatterモバイル変換


[0]ホーム

URL:


  1. 開発者向けのウェブ技術
  2. SVG
  3. リファレンス
  4. 属性
  5. lengthAdjust

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docsコミュニティーについてもっと知り、仲間になるにはこちらから。

View in EnglishAlways switch to English

lengthAdjust

lengthAdjust 属性は、テキストがtextLength 属性で定義された長さにどのように引き伸ばされるかを制御します。

この属性は次の SVG 要素で使用できます。

html,body,svg {  height: 100%;}
html
<svg width="300" height="150" xmlns="http://www.w3.org/2000/svg">  <g font-face="sans-serif">    <text x="0" y="20" textLength="300" lengthAdjust="spacing">      字間のみを使って引き伸ばします。    </text>    <text x="0" y="50" textLength="300" lengthAdjust="spacingAndGlyphs">      時間と字形を使って引き伸ばします。    </text>    <text x="0" y="80" textLength="100" lengthAdjust="spacing">      字間のみを使って縮小します。    </text>    <text x="0" y="110" textLength="100" lengthAdjust="spacingAndGlyphs">      時間と字形を使って縮小します。    </text>  </g></svg>

使用上のメモ

spacing |spacingAndGlyphs
デフォルト値spacing
アニメーションYes

仕様書

Specification
Scalable Vector Graphics (SVG) 2
# TextElementLengthAdjustAttribute

ブラウザーの互換性

svg.elements.text.lengthAdjust

svg.elements.tspan.lengthAdjust

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp