这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
ruby-position
CSS property defines the position of a ruby element relatives to its base element. It can be position over the element (
over
), under it (
under
), or between the characters, on their right side (
inter-character
).
/* Keyword values */ ruby-position: over; ruby-position: under; ruby-position: inter-character; /* Global values */ ruby-position: inherit; ruby-position: initial; ruby-position: unset;
over
Is a keyword indicating that the ruby has to be placed over the main text for horizontal scripts and right to it for vertical scripts.
under
Is a keyword indicating that the ruby has to be placed under the main text for horizontal scripts and left to it for vertical scripts.
inter-character
Is a keyword indicating that the ruby has to be placed between the different characters.
| 初始值 |
over
|
|---|---|
| 适用于 | ruby annotations containers |
| 继承 | yes |
| 计算值 | 如指定 |
| 动画类型 | discrete |
over | under | inter-character
<ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby>
ruby {
ruby-position:over;
}
<ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby>
ruby {
ruby-position:under;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Ruby Layout Module Level 1
The definition of 'ruby-position' in that specification. |
工作草案 | 初始定义 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ruby-position
Experimental
|
Chrome 不支持 No | Edge 不支持 12 — 79 | Firefox 完整支持 38 |
IE
不支持
No
注意事项
|
Opera 不支持 No |
Safari
不支持
No
注意事项
|
WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 完整支持 38 | Opera Android 不支持 No |
Safari iOS
不支持
No
注意事项
|
Samsung Internet Android 不支持 No |
inter-character
Experimental
|
Chrome 不支持 No | Edge 不支持 No | Firefox 不支持 No | IE 不支持 No | Opera 不支持 No | Safari 不支持 No | WebView Android 不支持 No | Chrome Android 不支持 No | Firefox Android 不支持 No | Opera Android 不支持 No | Safari iOS 不支持 No | Samsung Internet Android 不支持 No |
完整支持
不支持
实验。期望将来行为有所改变。
见实现注意事项。
<ruby>
,
<rt>
,
<rp>
,和
<rtc>
.
ruby-align
,
ruby-merge
.
ruby-align
ruby-position