aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/element/title
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/svg/element/title
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/svg/element/title')
-rw-r--r--files/zh-cn/web/svg/element/title/index.html124
1 files changed, 124 insertions, 0 deletions
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
+---
+<div>{{SVGRef}}</div>
+
+<p>SVG绘图中的每个窗口元素或图形元素都可以提供一个<code>title</code>描述性字符串,该描述只能是纯文本。如果当前的SVG文档片段在可视媒体中呈现为SVG,title元素不会呈现为绘图的一部分。然而,一些用户代理可能会,举个例子,把<code>title</code>显示为一个提示冒泡。替代性提词既可以看到也可以听到,它显示了title元素但是不会显示路径元素或者别的图形元素。<code>title</code>元素通常提升了SVG文档的可访问性。</p>
+
+<p>通常<code>title</code>元素必须是它的父元素的第一个子元素。注意,只有当<code>title</code>是它的父元素的第一个子元素的时候,那些编译器才会把<code>title</code>显示为一个提示冒泡。</p>
+
+<h2 id="用法">用法</h2>
+
+<p>{{svginfo}}</p>
+
+<h2 id="示例">示例</h2>
+
+<p>下面的代码片段显示了SVG <code>&lt;title&gt;</code>标签的用法。</p>
+
+<pre class="brush: xml">&lt;svg width="500" height="300" xmlns="http://www.w3.org/2000/svg"&gt;
+ &lt;g&gt;
+ &lt;title&gt;SVG Title Demo example&lt;/title&gt;
+ &lt;rect x="10" y="10" width="200" height="50"
+ style="fill:none; stroke:blue; stroke-width:1px"/&gt;
+ &lt;/g&gt;
+&lt;/svg&gt;
+</pre>
+
+<h2 id="属性">属性</h2>
+
+<h3 id="全局属性">全局属性</h3>
+
+<ul>
+ <li><a href="/en-US/SVG/Attribute#Core">核心属性</a> »</li>
+ <li>{{ SVGAttr("class") }}</li>
+ <li>{{ SVGAttr("style") }}</li>
+</ul>
+
+<h3 id="专有属性">专有属性</h3>
+
+<p><em>没有专有属性</em></p>
+
+<h2 id="DOM_接口">DOM 接口</h2>
+
+<p>该元素实现了<code><a href="/en-US/DOM/SVGTitleElement">SVGTitleElement</a></code>接口。</p>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>1.0</td>
+ <td>{{CompatGeckoDesktop('1.8')}}</td>
+ <td>{{CompatIE('9.0')}}</td>
+ <td>{{CompatOpera('8.0')}}</td>
+ <td>{{CompatSafari('3.0.4')}}</td>
+ </tr>
+ <tr>
+ <td>Tooltip display</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop('2.0')}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatAndroid('3.0')}}</td>
+ <td>{{CompatGeckoMobile('1.8')}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatSafari('3.0.4')}}</td>
+ </tr>
+ <tr>
+ <td>Tooltip display</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatGeckoDesktop('2.0')}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>该表格基于<a href="/en-US/SVG/Compatibility_sources">这些数据</a>。</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{ SVGElement("desc") }}</li>
+</ul>