From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/svg/element/title/index.html | 124 +++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 files/zh-cn/web/svg/element/title/index.html (limited to 'files/zh-cn/web/svg/element/title') diff --git a/files/zh-cn/web/svg/element/title/index.html b/files/zh-cn/web/svg/element/title/index.html new file mode 100644 index 0000000000..5d7013239b --- /dev/null +++ b/files/zh-cn/web/svg/element/title/index.html @@ -0,0 +1,124 @@ +--- +title: title +slug: Web/SVG/Element/title +tags: + - SVG + - SVG描述 + - 元素 + - 参考 +translation_of: Web/SVG/Element/title +--- +
{{SVGRef}}
+ +

SVG绘图中的每个窗口元素或图形元素都可以提供一个title描述性字符串,该描述只能是纯文本。如果当前的SVG文档片段在可视媒体中呈现为SVG,title元素不会呈现为绘图的一部分。然而,一些用户代理可能会,举个例子,把title显示为一个提示冒泡。替代性提词既可以看到也可以听到,它显示了title元素但是不会显示路径元素或者别的图形元素。title元素通常提升了SVG文档的可访问性。

+ +

通常title元素必须是它的父元素的第一个子元素。注意,只有当title是它的父元素的第一个子元素的时候,那些编译器才会把title显示为一个提示冒泡。

+ +

用法

+ +

{{svginfo}}

+ +

示例

+ +

下面的代码片段显示了SVG <title>标签的用法。

+ +
<svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
+  <g>
+    <title>SVG Title Demo example</title>
+    <rect x="10" y="10" width="200" height="50"
+    style="fill:none; stroke:blue; stroke-width:1px"/>
+  </g>
+</svg>
+
+ +

属性

+ +

全局属性

+ + + +

专有属性

+ +

没有专有属性

+ +

DOM 接口

+ +

该元素实现了SVGTitleElement接口。

+ +

浏览器兼容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0{{CompatGeckoDesktop('1.8')}}{{CompatIE('9.0')}}{{CompatOpera('8.0')}}{{CompatSafari('3.0.4')}}
Tooltip display{{CompatUnknown}}{{CompatGeckoDesktop('2.0')}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatAndroid('3.0')}}{{CompatGeckoMobile('1.8')}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatSafari('3.0.4')}}
Tooltip display{{CompatUnknown}}{{CompatGeckoDesktop('2.0')}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
+
+ +

该表格基于这些数据

+ +

参见

+ + -- cgit v1.2.3-54-g00ecf