如何在SVG <text>元素中添加换行符?

时间:2019-02-07 12:56:43

标签: html css svg

我正在使用模板,因此我只能更改元素的内容(在这里:“我爱SVG!”)或使用CSS。

<svg height="30" width="200">
  <text x="0" y="15" fill="red">I love SVG!</text>
</svg>

我想要这样的结果:

<svg height="45" width="200">
  <text x="0" y="15" fill="red">I</text>
  <text x="0" y="30" fill="red">love</text>
  <text x="0" y="45" fill="red">SVG!</text>

</svg>

0 个答案:

没有答案
相关问题