svg-labels.html 587 B

123456
  1. <!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width">
  2. <style>body{margin:0;padding:32px;font:14px sans-serif;color:#111;background:#fff}svg{display:block;width:100%;max-width:600px}</style></head><body>
  3. <svg viewBox="0 0 600 300"><rect x="40" y="60" width="60" height="220" fill="#1e3a8a"/>
  4. <text x="70" y="80" font-size="14" fill="#fff" text-anchor="middle">220</text>
  5. <text x="300" y="150" font-size="14" fill="#111">Very long label one</text><text x="330" y="153" font-size="14" fill="#111">Overlapping label</text></svg>
  6. </body></html>