side - SVG: Scalable Vector Graphics 编辑
The side
attribute determines the side of a path the text is placed on (relative to the path direction).
Only one element is using this attribute: <textPath>
html, body, svg {
height: 100%;
}
text {
font: 25px Arial, Helvelica, sans-serif;
}
<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>
Usage notes
Value | left | right |
---|---|
Default value | left |
Animatable | Yes |
left
- This value places the text on the left side of the path (relative to the path direction).
right
- This value places the text on the right side of the path (relative to the path direction). This effectively reverses the path direction.
Specifications
Specification | Status | Comment |
---|---|---|
Scalable Vector Graphics (SVG) 2 The definition of 'side' in that specification. | Candidate Recommendation | Initial definition |
Browser compatibility
BCD tables only load in the browser
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论