这篇文章需要技术复核。如何帮忙。
这篇文章需要文法复核。如何帮忙。
<text> 的文本内容既可以是直接嵌入在<text>元素中的的字符数据 ,也可以是引用元素的字符数据内容,tref元素用来指定的包含文本内容的引用元素。
用法
| 类别 | 文本内容元素, 文本内容子元素 |
|---|---|
| 允许的内容物 | 任意数量、任意排序的下列元素: 描述性元素 <animate>, <animateColor>, <set> |
示例
<svg width="100%" height="100%" viewBox="0 0 1000 300"
xmlns="https://www.w3.org/2000/svg"
xmlns:xlink="https://www.w3.org/1999/xlink">
<defs>
<text id="ReferencedText">
Referenced character data
</text>
</defs>
<text x="100" y="100" font-size="45" >
Inline character data
</text>
<text x="100" y="200" font-size="45" fill="red" >
<tref xlink:href="#ReferencedText"/>
</text>
<!-- Show outline of canvas using 'rect' element -->
<rect x="1" y="1" width="998" height="298"
fill="none" stroke-width="2" />
</svg>
属性
全局属性
专有属性
DOM 接口
该元素实现了SVGTRefElement接口。
浏览器兼容性
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | ? | 未实现 | ? | ? | ? |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | 未实现 | ? | ? | ? |