SVG Namespace prefix xlink for href on textpath is not defined

前端 未结 2 1541
情深已故
情深已故 2021-01-17 07:54

So I\'m trying to make a simple textpath .svg that would be a vertical line with some text. The problem I am getting is that the tags seem to throw everything off. I think

2条回答
  •  [愿得一人]
    2021-01-17 08:50

    SVG is a case sensitive language so textpath actually needs to be written as textPath.

    If you embed the SVG in html then you don't need namespaces as html doesn't support them (unlike xhtml). If you have your SVG standalone you'll also need xmlns:xlink="http://www.w3.org/1999/xlink" on the root element.

提交回复
热议问题