lengthAdjust
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
Das Attribut lengthAdjust
steuert, wie der Text in die durch das Attribut textLength
definierte Länge gestreckt wird.
Sie können dieses Attribut mit den folgenden SVG-Elementen verwenden:
Beispiel
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">
Stretched using spacing only.
</text>
<text x="0" y="50" textLength="300" lengthAdjust="spacingAndGlyphs">
Stretched using spacing and glyphs.
</text>
<text x="0" y="80" textLength="100" lengthAdjust="spacing">
Shrunk using spacing only.
</text>
<text x="0" y="110" textLength="100" lengthAdjust="spacingAndGlyphs">
Shrunk using spacing and glyphs.
</text>
</g>
</svg>
Nutzungshinweise
Wert | spacing | spacingAndGlyphs |
---|---|
Standardwert | spacing |
Animierbar | Ja |
Spezifikationen
Specification |
---|
Scalable Vector Graphics (SVG) 2 # TextElementLengthAdjustAttribute |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
lengthAdjust |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.