side
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Thuộc tính side xác định phía của một đường dẫn mà văn bản được đặt lên trên đó (tương đối với hướng của đường dẫn).
Bạn có thể dùng thuộc tính này với phần tử SVG sau:
Ví dụ
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>
Ghi chú sử dụng
| Giá trị | left | right |
|---|---|
| Giá trị mặc định | left |
| Có thể animate | Có |
Thông số kỹ thuật
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2> # TextPathElementSideAttribute> |