Besuchen Sie unseren Adventskalender 2022!
SVG/Elemente/textPath
Aus SELFHTML-Wiki
Das textPath-Element richtet Text entlang eines Pfades aus. Dabei werden die Positionen und Rotationen der einzelnen Zeichen automatisch berechnet.
Beispiel
<path id="eins" d="M 20,140
h 100
a 100,100 0 0,0 70,-50
a 100,100 0 0,1 70,-50
h 470
a 50,50 1 0,1 50,50
v 200"/>
<text>
<textPath class="schreib" href="#eins">
Es geht langsam aufwärts...
</textPath>
</text>
Siehe auch
Weblinks
- W3C: TextPathElement
Syntax | Start-Tag: notwendig End-Tag: notwendig <textPath>…</textPath> |
---|---|
Elternelemente | Darf vorkommen in: |
erlaubte Inhalte |
Name | Inhalt | Standardwert | Bedeutung |
---|---|---|---|
Kernattribute | |||
class | ID | ordnet ein Element einer oder mehreren Klassen zu. | |
id | ID | identifiziert ein einziges Element innerhalb eines Dokuments | |
lang | ID | identifiziert eine Sprachangabe | |
style | ID | CDATA | Stilangabe durch Präsentationsattribute |
tabindex | ID | macht Element „antabbbar“ | |
xml:base | CDATA | Basis-URL | |
xml:lang | Sprachkürzel | legt eine den IANA-Sprachdefinitionen folgende Sprache des Elementinhalts fest [RFC1766] | |
xml:space | default, preserve | Verhalten gegenüber whitespace)
| |
Präsentationsattribute | |||
alignment-baseline | |||
baseline-shift | |||
clip | |||
clip-path | |||
clip-rule | |||
color | |||
cursor | |||
cx | (SVG2) | ||
cy | (SVG2) | ||
direction | |||
display | |||
dominant-baseline | |||
filter | |||
flood-color | |||
flood-opacity | |||
font | |||
font-family | |||
font-size | |||
font-size-adjust | |||
font-stretch | |||
font-style | |||
font-variant | |||
font-weight | |||
glyph-orientation-horizontal | |||
glyph-orientation-vertical | |||
height | (SVG2) | ||
isolation | |||
letter-spacing | |||
lighting-color | |||
mask | |||
opacity | |||
overflow | |||
pointer-events | |||
r | (SVG2) | ||
rx | (SVG2) | ||
ry | (SVG2) | ||
text-anchor | |||
text-decoration | |||
unicode-bidi | |||
visibility | |||
word-spacing | |||
writing-mode | |||
width | (SVG2) | ||
x | (SVG2) | ||
y | (SVG2)
| ||
href | CDATA | (auch Xlink:href) | |
lengthAdjust | CDATA | ||
method | align, stretch | align | |
spacing | auto, exact | auto | wie Zeichen und Zeichenabstände gerendert werden sollen |
startOffset | NUMBER | 0 | Startpunkt des Texts |
textLength | NUMBER | kein | Länge des Texts |
transform | CDATA |
Attribut: Pflichtattribut
Attribut: optionales Attribut