aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html/element/rt/index.html
blob: e5ed3ee18c5ba045b32d02bad68c64a227d6873c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
title: <rt>
slug: Web/HTML/Element/rt
translation_of: Web/HTML/Element/rt
---
<p><strong>HTML Ruby 文本 (<code>&lt;rt&gt;</code>) 元素</strong>包含字符的发音,字符在 ruby 注解中出现,它用于描述东亚字符的发音。这个元素始终在 {{ HTMLElement("ruby") }} 元素中使用。</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories">内容分类</a></th>
   <td>无  </td>
  </tr>
  <tr>
   <th scope="row">允许的内容</th>
   <td><a href="/en-US/docs/Web/HTML/Content_categories#Phrasing_content">短语内容</a></td>
  </tr>
  <tr>
   <th scope="row">标签省略</th>
   <td>如果 {{HTMLElement("rt")}} 元素紧紧跟随  {{HTMLElement("rt")}} 或者 {{HTMLElement("rp")}} 元素,或者父元素中没有更多内容了,结束标签可以省略。</td>
  </tr>
  <tr>
   <th scope="row">允许的父元素</th>
   <td>{{HTMLElement("ruby")}} 元素</td>
  </tr>
  <tr>
   <th scope="row">允许的 ARIA 角色</th>
   <td>任意     </td>
  </tr>
  <tr>
   <th scope="row">DOM 接口</th>
   <td>{{domxref("HTMLElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="属性">属性</h2>

<p>该元素仅仅包含 <a href="/en-US/docs/HTML/Global_attributes">全局属性</a></p>

<h2 id="示例">示例</h2>

<pre class="brush: html">&lt;ruby&gt;&lt;rt&gt;Hàn&lt;/rt&gt;&lt;rt&gt;&lt;/rt&gt;
&lt;/ruby&gt;
</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'semantics.html#the-rt-element', '&lt;rt&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-rt-element', '&lt;rt&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>

{{Compat("html.elements.rt")}}

<h2 id="另见">另见</h2>

<ul>
 <li>{{HTMLElement("ruby")}}</li>
 <li>{{HTMLElement("rp")}}</li>
 <li>{{HTMLElement("rb")}}</li>
 <li>
  <p>{{HTMLElement("rtc")}}</p>
 </li>
</ul>

<p>{{ HTMLRef }}</p>