aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/html/element/ruby/index.html
blob: e0e1eb9dd2c39682387f6e795faca42eebeb36ef (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
89
90
91
92
93
---
title: <ruby>
slug: Web/HTML/Element/ruby
translation_of: Web/HTML/Element/ruby
---
<div>{{HTMLRef}}</div>

<p><strong>HTML <code>&lt;ruby&gt;</code> 元素</strong>的意思是旁註標記。旁註標記用於標示東亞文字的發音。</p>

<div>{{EmbedInteractiveExample("pages/tabbed/ruby.html", "tabbed-shorter")}}</div>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/zh-TW/docs/Web/HTML/Content_categories" title="HTML/Content_categories">內容類型</a></th>
   <td><a href="/zh-TW/docs/Web/HTML/Content_categories#Flow_content" title="HTML/Content_categories#Phrasing_content">流內容</a><a href="/zh-TW/docs/Web/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">段落型內容</a>、捫及內容</td>
  </tr>
  <tr>
   <th scope="row">允許內容</th>
   <td><a href="/zh-TW/docs/Web/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">段落型內容</a></td>
  </tr>
  <tr>
   <th scope="row">標籤省略</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">允許父元素</th>
   <td>Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a></td>
  </tr>
  <tr>
   <th scope="row">DOM 介面</th>
   <td>{{domxref("HTMLElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes" name="Attributes">屬性</h2>

<p>這個元素只支援<a href="/zh-TW/docs/Web/HTML/Global_attributes" title="HTML/Global attributes">全域屬性</a></p>

<h2 id="Examples" name="Examples">範例</h2>

<h3 id="範例一:字">範例一:字</h3>

<pre class="brush:html">&lt;ruby&gt;&lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;Kan&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;&lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;ji&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
&lt;/ruby&gt;</pre>

<h3 id="範例二:詞">範例二:詞</h3>

<pre class="brush:html">&lt;ruby&gt;
  明日 &lt;rp&gt;(&lt;/rp&gt;&lt;rt&gt;Ashita&lt;/rt&gt;&lt;rp&gt;)&lt;/rp&gt;
&lt;/ruby&gt;</pre>

<h2 id="Specifications" name="Specifications">規範</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">規範</th>
   <th scope="col">狀態</th>
   <th scope="col">註解</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-ruby-element', '&lt;ruby&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-ruby-element', '&lt;ruby&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td></td>
  </tr>
 </tbody>
</table>

<h2 id="瀏覽器相容性">瀏覽器相容性</h2>

<p>{{Compat("html.elements.ruby")}}</p>

<h2 id="See_also" name="See_also">參閱</h2>

<ul>
 <li>{{HTMLElement("rt")}}</li>
 <li>{{HTMLElement("rp")}}</li>
 <li>{{HTMLElement("rb")}}</li>
 <li>{{HTMLElement("rtc")}}</li>
 <li>{{HTMLElement("rbc")}}</li>
 <li>{{CSSxRef("text-transform")}}: full-size-kana</li>
</ul>