此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。
<rt>:Ruby 文本元素
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
<rt> HTML 元素用於指定 ruby 注釋的 ruby 文本部分,用於為東亞排版提供發音、翻譯或音譯信息。<rt> 元素必須始終包含在一個 <ruby> 元素中。
嘗試一下
<ruby>
漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp>
</ruby>
ruby {
font-size: 2em;
}
請參見 <ruby> 元素的文章以獲取更多範例。
屬性
該元素僅包含全域屬性。
範例
>使用 ruby 注釋
此簡單範例為 <ruby> 元素中的漢字字符提供了羅馬字音譯:
html
<ruby> 漢 <rt>Kan</rt> 字 <rt>ji</rt> </ruby>
body {
font-size: 22px;
}
結果
[フレーム]
技術摘要
規範
| Specification |
|---|
| HTML> # the-rt-element> |
瀏覽器相容性
Loading...