aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/css/ruby-position/index.html
blob: 6cb66cd58d07a61044ddc65602fc7b0ec23087da (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
title: ruby-position
slug: Web/CSS/ruby-position
tags:
  - CSS
  - CSS プロパティ
  - CSS ルビ
  - リファレンス
translation_of: Web/CSS/ruby-position
---
<div>{{CSSRef}}{{SeeCompatTable}}</div>

<p>CSS の <code><strong>ruby-position</strong></code> プロパティは、ベース要素に対するルビ要素の位置を定義します。要素の上方 (<code>over</code>)、下方 (<code>under</code>)、文字の間の右側 (<code>inter-character</code>) に配置できます。</p>

<pre class="brush:css">/* キーワード値 */
ruby-position: over;
ruby-position: under;
ruby-position: inter-character;

/* グローバル値 */
ruby-position: inherit;
ruby-position: initial;
ruby-position: unset;
</pre>

<p>{{cssinfo}}</p>

<h2 id="Syntax" name="Syntax">構文</h2>

<h3 id="Values" name="Values"></h3>

<dl>
 <dt><code>over</code></dt>
 <dd><img alt="over の例" src="https://mdn.mozillademos.org/files/10251/Screen%20Shot%202015-03-04%20at%2013.02.20.png" style="height: 31px; width: 77px;">ルビをメインテキストの上 (横書きの場合) または右 (縦書きの場合) に配置することを示すキーワードです。</dd>
 <dt><code>under</code></dt>
 <dd><img alt="under の例" src="https://mdn.mozillademos.org/files/10249/Screen%20Shot%202015-03-04%20at%2013.02.07.png" style="height: 34px; width: 78px;">ルビをメインテキストの下 (横書きの場合) または左 (縦書きの場合) に配置することを示すキーワードです。</dd>
 <dt><code>inter-character</code></dt>
 <dd>ルビをそれぞれの文字の間に配置することを示すキーワードです。</dd>
</dl>

<h3 id="Formal_syntax" name="Formal_syntax">形式文法</h3>

{{csssyntax}}

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

<p>この HTML は、 <code>ruby-position</code> のそれぞれの値でレンダリングします。</p>

<pre class="brush: html">&lt;ruby&gt;
  &lt;rb&gt;超電磁砲&lt;/rb&gt;
  &lt;rp&gt;&lt;/rp&gt;&lt;rt&gt;レールガン&lt;/rt&gt;&lt;rp&gt;&lt;/rp&gt;
&lt;/ruby&gt;
</pre>

<h3 id="Ruby_positioned_over_the_text" name="Ruby_positioned_over_the_text">テキストの上に配置したルビ</h3>

<pre class="brush: html" style="display: none;">&lt;ruby&gt;
  &lt;rb&gt;超電磁砲&lt;/rb&gt;
  &lt;rp&gt;&lt;/rp&gt;&lt;rt&gt;レールガン&lt;/rt&gt;&lt;rp&gt;&lt;/rp&gt;
&lt;/ruby&gt;
</pre>

<pre class="brush: css">ruby {
    ruby-position:over;
}</pre>

<p>結果は以下のとおりです。</p>

<p>{{EmbedLiveSample("Ruby_positioned_over_the_text", 100, 40)}}</p>

<h3 id="Ruby_positioned_under_the_text" name="Ruby_positioned_under_the_text">テキストの下に配置したルビ</h3>

<pre class="brush: html" style="display: none;">&lt;ruby&gt;
  &lt;rb&gt;超電磁砲&lt;/rb&gt;
  &lt;rp&gt;&lt;/rp&gt;&lt;rt&gt;レールガン&lt;/rt&gt;&lt;rp&gt;&lt;/rp&gt;
&lt;/ruby&gt;
</pre>

<pre class="brush: css">ruby {
    ruby-position:under;
}</pre>

<p>結果は以下のとおりです。</p>

<p>{{EmbedLiveSample("Ruby_positioned_under_the_text", 100, 40)}}</p>

<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('CSS3 Ruby', '#rubypos', 'ruby-position')}}</td>
   <td>{{Spec2('CSS3 Ruby')}}</td>
   <td>初回定義</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>

<p>{{Compat("css.properties.ruby-position")}}</p>

<h2 id="See_also" name="See_also">関連情報</h2>

<ul>
 <li>HTML のルビ関連要素: {{HTMLElement("ruby")}}, {{HTMLElement("rt")}}, {{HTMLElement("rp")}}, {{HTMLElement("rtc")}}</li>
 <li>CSS のルビ関連プロパティ: {{cssxref("ruby-align")}}, {{cssxref("ruby-merge")}}</li>
</ul>