Beispiel:SVG-text-mehrzeilige-1.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" media="screen" href="./Beispiel:Grundlayout.css">
<style>
svg {
background: white;
border: thin dotted #337799;
width: 800px;
height: 350px;
}
text {
font-size: 16px;
}
text[role=heading] {
font-size: 24px;
font-weight: bold;
}
.strong {
font-weight: bold;
}
</style>
<title>Beispiel: inline-size</title>
</head>
<body>
<h1>mehrzeiliger Text in SVG 2 mit inline-size</h1>
<svg>
<rect x="10" y="10" width="200" height="150" fill="#5a9905"/>
<text x="20" y="40" inline-size="180" role="heading">
Überschrift
</text>
<text x="20" y="60" inline-size="180" >
Dies ist ein Textabsatz mit einem
<tspan class="strong">fetten</tspan>
Wort und automatischem Zeilenumbruch.
</text>
<text x="10" y="200" fill="red"> Dieses Beispiel wird gegenwärtig noch nicht von Browsern unterstützt.</text>
</svg>
</body>
</html>