你好傢伙我創建了一個與SVG 5段的圓圈,即時嘗試添加段內的文本,但我不能讓它正常工作。SVG曲線文本里面的路徑
這是林試圖做 Text curved and centered inside the path
這就是即時得到: enter image description here
這是到目前爲止我的代碼,有什麼建議?
<svg viewBox='0 0 110 110' style="margin-top: 10px;transform: rotate(18deg);">
<a xlink:href="">
<path class="frag logoa" id="f1" data-link="1" d='M55,55 L14.54915028125263,25.61073738537635 A50,50 0 0,1 70.45084971874736,7.447174185242318z' >
</path>
<text font-family="Verdana" font-size="15" stroke="red";>
<textPath xlink:href="#f1">
We go up, then we go down, then up again
</textPath>
</text>
</a>
<a xlink:href="" >
<path class="frag logoa" data-link="2" d='M55,55 L70.45084971874736,7.447174185242318 A50,50 0 0,1 105,54.999999999999986z' ></path>
</a>
<a xlink:href="" >
<path class="frag logoa" data-link="3" d='M55,55 L105,55 A50,50 0 0,1 70.45084971874738,102.55282581475768z'></path>
</a>
<a xlink:href="" >
<path class="frag logoa" data-link="4" d='M55,55 L70.45084971874738,102.55282581475768 A50,50 0 0,1 14.549150281252636,84.38926261462366z' ></path>
</a>
<a xlink:href="" >
<path class="frag logoa" data-link="5" d='M55,55 L14.549150281252636,84.38926261462366 A50,50 0 0,1 14.54915028125263,25.61073738537635z' ></path>
</a>
<circle class="cente" cx='55' cy='55' r='35' ></circle>
<circle class="minicirculo" cx='55' cy='55' r='15' ></circle>
</svg>
你有沒有試圖改變字體大小? –
是的,我試過........... –
不知道你是否看到過這個或想使用外部庫,但是這個例子的代碼與你想要做的類似:https://www.visualcinnamon.com/2015/09/placing-text-on-arcs.html –