ruby-align: ***; ruby-overhang: ***; ruby-position: ***;
Browser |
|
---|---|
Type |
|
The ruby-align, ruby-overhang, and ruby-position properties sets how the ruby is displayed.
- ruby-align : Specifies the horizontal alignment of the ruby text.
- ruby-overhang : Specifies how the ruby text overhang other text.
- ruby-position : Specifies the position of the ruby text.
ruby {
ruby-align: distribute-space;
ruby-overhang: auto;
ruby-position: above;
}
In the following examples, the ruby is defined for the blue text.
Property | Value | Example |
---|---|---|
ruby-align | auto | |
left | ||
center | ||
right | ||
distribute-letter | ||
distribute-space | ||
line-edge |
ABC ABCDEFGHI |
|
ruby-overhang | auto | ABCD |
whitespace | ABCD |
|
none | ABCD |
|
ruby-position | above | |
inline |
Example
<html>
<head>
<title>TAG index</title>
<style type="text/css">
#example1 { ruby-align: distribute-letter; }
#example2 { ruby-position: inline; }
</style>
</head>
<body>
<p>
<ruby>
<rb>EXAMPLE</rb><rp>(</rp><rt>Ruby</rt><rp>)</rp>
</ruby>
</p>
<p>
<ruby id="example1">
<rb>EXAMPLE</rb><rp>(</rp><rt>Ruby</rt><rp>)</rp>
</ruby>
</p>
<p>
<ruby id="example2">
<rb>EXAMPLE</rb><rp>(</rp><rt>Ruby</rt><rp>)</rp>
</ruby>
</p>
</body>
</html>
- Output
-
EXAMPLE EXAMPLE EXAMPLE