我想把文本右对齐到textPath的末尾:
<svg height="300" width="400">
<defs>
<path id="myTextPath" d="M30,160 A175,175 0 0,1 370,160" />
</defs>
<path d="M30,160 A175,175 0 0,1 370,160" style="stroke: black; stroke-width:1; fill:none;" />
<g fill="black" stroke="none">
<text x="0%" y="0" text-anchor="start">
<textPath xlink:href="#myTextPath">Start</textPath>
</text>
<text x="50%" y="0" text-anchor="middle">
<textPath xlink:href="#myTextPath">Middle</textPath>
</text>
<text x="100%" y="0" text-anchor="end">
<textPath xlink:href="#myTextPath">End</textPath>
</text>
</g>
</svg>
您可以在此处查看其工作示例:http://jsfiddle.net/7sqdxw11/ “开始”文本从textPath的开头开始,这一点我很满意。
然而,“结束”文本却远未到达textPath的末端。
(“中间”文本也明显偏离了textPath的中央)。
以下是屏幕截图: 我做错了什么?如何使“结束”文本位于textPath弧的正确末端?