---
title: tspan
slug: Web/SVG/Element/tspan
tags:
- SVG
- SVG文本子元素
- 元素
- 参考
- 需要兼容性表
translation_of: Web/SVG/Element/tspan
---
{{SVGRef}}
在 {{SVGElement("text")}}元素中,利用内含的tspan
元素,可以调整文本和字体的属性以及当前文本的位置、绝对或相对坐标值。
用法
{{svginfo}}
示例
» tspan.svg
属性
全局属性
- 条件处理属性 »
- 核心属性 »
- 图形事件属性 »
- 外观属性 »
- {{ SVGAttr("class") }}
- {{ SVGAttr("style") }}
- {{ SVGAttr("externalResourcesRequired") }}
专有属性
- {{ SVGAttr("x") }}
- {{ SVGAttr("y") }}
- {{ SVGAttr("dx") }}
- {{ SVGAttr("dy") }}
- {{ SVGAttr("rotate") }}
- {{ SVGAttr("textLength") }}
- {{ SVGAttr("lengthAdjust") }}
DOM 接口
该元素实现了SVGTSpanElement
接口。
浏览器兼容性
{{Compat("svg.elements.tspan")}}
参见