SVG/Element/foreignObject

Aus SELFHTML-Wiki
< SVG‎ | Element
Wechseln zu: Navigation, Suche

Das foreignObject-Element kann SVG durch andere XML-Formate, unter anderem XHTML oder MathML, erweitern.

Syntax
Start-Tag: notwendig
End-Tag: notwendig
Elternelemente
Darf vorkommen in:
jedem Element, das fließenden Inhalt erlaubt.
außer a-Element
erlaubte Inhalte
alle Elemente
Attribute
Name Inhalt Standardwert Bedeutung
height NUMBER Höhe
transform CDATA
width NUMBER Breite
x NUMBER x-Position
y NUMBER y-Position

Attribut: Pflichtattribut
Attribut: optionales Attribut

Beispiel
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> <foreignObject x="40" y="40" width="100" height="100" requiredExtensions="https://www.w3.org/1999/xhtml"> <div xmlns="https://www.w3.org/1999/xhtml" > Inhalt </div> </foreignObject> </svg>


Beachten Sie: Wenn Sie SVG in Webseiten mit HTML5-Doctype einbetten, benötigen Sie keine Namensraumdeklaration für die SVG- und die foreignObject-Elemente mehr.

Siehe auch

Weblinks