unicode-bidi
CSS
property, together with the
direction
property, determines how bidirectional text in a document is handled. For example, if a block of content contains both left-to-right and right-to-left text, the user-agent uses a complex Unicode algorithm to decide how to display the text. The
unicode-bidi
property overrides this algorithm and allows the developer to control the text embedding.
unicode-bidi
and
direction
properties are the only properties that are not affected by the
all
shorthand.
注意: This property is intended for Document Type Definition (DTD) designers. Web designers and similar authors should not override it.
/* Keyword values */ unicode-bidi: normal; unicode-bidi: embed; unicode-bidi: isolate; unicode-bidi: bidi-override; unicode-bidi: isolate-override; unicode-bidi: plaintext; /* Global values */ unicode-bidi: inherit; unicode-bidi: initial; unicode-bidi: unset;
normal
The element does not offer an additional level of embedding with respect to the bidirectional algorithm. For inline elements, implicit reordering works across element boundaries.
embed
direction
特性。
bidi-override
direction
property; the implicit part of the bidirectional algorithm is ignored.
isolate
U+FFFC Object Replacement Character
, i.e. like an image.
isolate-override
isolate
keyword to the surrounding content and the override behavior of the
bidi-override
keyword to the inner content.
plaintext
direction
property. The directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.
| 初始值 |
normal
|
|---|---|
| 适用于 | all elements, though some values have no effect on non-inline elements |
| 继承 | no |
| 计算值 | 如指定 |
| 动画类型 | discrete |
normal | embed | isolate | bidi-override | isolate-override | plaintext
.bible-quote {
direction: rtl;
unicode-bidi: embed;
}
<div class="bible-quote"> A line of text </div> <div> Another line of text </div>
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Writing Modes Module Level 3
The definition of 'unicode-bidi' in that specification. |
Proposed Recommendation |
添加
plaintext
,
isolate
,和
isolate-override
keywords.
|
|
CSS Level 2 (Revision 1)
The definition of 'unicode-bidi' in that specification. |
推荐 | 初始定义。 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
unicode-bidi
|
Chrome 完整支持 2 | Edge 完整支持 12 | Firefox 完整支持 1 | IE 完整支持 5.5 | Opera 完整支持 9.2 | Safari 完整支持 1.3 | WebView Android 完整支持 1 | Chrome Android 完整支持 18 | Firefox Android 完整支持 4 | Opera Android 完整支持 10.1 | Safari iOS 完整支持 3.1 | Samsung Internet Android 完整支持 1.0 |
isolate
|
Chrome
完整支持
48
|
Edge 完整支持 79 |
Firefox
完整支持
50
|
IE 不支持 No |
Opera
完整支持
35
|
Safari
完整支持
6
Prefixed
注意事项
|
WebView Android 完整支持 48 | Chrome Android 完整支持 48 |
Firefox Android
完整支持
50
|
Opera Android 完整支持 35 |
Safari iOS
完整支持
6
Prefixed
注意事项
|
Samsung Internet Android 完整支持 5.0 |
isolate-override
|
Chrome 完整支持 48 | Edge 完整支持 79 |
Firefox
完整支持
50
|
IE 不支持 No | Opera 完整支持 35 | Safari 不支持 No | WebView Android 完整支持 48 | Chrome Android 完整支持 48 |
Firefox Android
完整支持
50
|
Opera Android 完整支持 35 | Safari iOS 不支持 No | Samsung Internet Android 完整支持 5.0 |
plaintext
|
Chrome 完整支持 48 | Edge 完整支持 79 |
Firefox
完整支持
50
|
IE 不支持 No | Opera 完整支持 35 | Safari 不支持 No | WebView Android 完整支持 48 | Chrome Android 完整支持 48 |
Firefox Android
完整支持
50
|
Opera Android 完整支持 35 | Safari iOS 不支持 No | Samsung Internet Android 完整支持 5.0 |
完整支持
不支持
见实现注意事项。
要求使用供应商前缀或不同名称。
direction
text-combine-upright
text-orientation
unicode-bidi
writing-mode