側
side 屬性決定了文字放置在路徑的哪一側(相對於路徑方向)。
你可以將此屬性與以下 SVG 元素一起使用
示例
html
<svg viewBox="0 0 420 200" xmlns="http://www.w3.org/2000/svg">
<text>
<textPath href="#circle1" side="left">Text left from the path</textPath>
</text>
<text>
<textPath href="#circle2" side="right">Text right from the path</textPath>
</text>
<circle
id="circle1"
cx="100"
cy="100"
r="70"
fill="transparent"
stroke="silver" />
<circle
id="circle2"
cx="320"
cy="100"
r="70"
fill="transparent"
stroke="silver" />
</svg>
用法說明
| 值 | left | right |
|---|---|
| 預設值 | left |
| 可動畫的 | 是 |
規範
| 規範 |
|---|
| Scalable Vector Graphics (SVG) 2 # TextPathElementSideAttribute |
瀏覽器相容性
載入中…