这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
ruby-align
CSS property defines the distribution of the different ruby elements over the base.
/* Keyword values */ ruby-align: start; ruby-align: center; ruby-align: space-between; ruby-align: space-around; /* Global values */ ruby-align: inherit; ruby-align: initial; ruby-align: unset;
start
Is a keyword indicating that the ruby will be aligned with the start of the base text.
center
Is a keyword indicating that the ruby will be aligned at the middle of the base text.
space-between
Is a keyword indicating that the extra space will be distributed between the elements of the ruby.
space-around
Is a keyword indicating that the extra space will be distributed between the elements of the ruby, and around it.
| 初始值 |
space-around
|
|---|---|
| 适用于 | ruby bases, ruby annotations, ruby base containers, ruby annotation containers |
| 继承 | yes |
| 计算值 | 如指定 |
| 动画类型 | discrete |
start | center | space-between | space-around
<ruby> <rb>This is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby>
ruby {
ruby-align: start;
}
<ruby> <rb>This is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby>
ruby {
ruby-align: center;
}
<ruby> <rb>This is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby>
ruby {
ruby-align: space-between;
}
<ruby> <rb>This is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby>
ruby {
ruby-align: space-around;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Ruby Layout Module Level 1
The definition of 'ruby-align' in that specification. |
工作草案 | 初始定义 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ruby-align
Experimental
|
Chrome 不支持 No | Edge 不支持 No | 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 |
完整支持
不支持
实验。期望将来行为有所改变。
见实现注意事项。
<ruby>
,
<rt>
,
<rp>
,和
<rtc>
.
ruby-position
,
ruby-merge
.
ruby-align
ruby-position