English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
unicode-the bidi property is used together with the direction property to set or return whether the text is overridden, so that multiple languages can be supported in the same document.
unicode-bidi CSS property andDirectionthe property is related to the handling of bidirectional text in the document. For example, if a text block contains text from left to right and from right to left, the user agent will applyUnicode standarda complex algorithm defined by the Unicode standard to determine the correct text direction.
Directionand unicode-The bidi property allows developers to control the embedding level and override of the algorithm.
The table below provides usage instructions and version history for this property, as well as the syntax for using this property in JavaScript scripts.
Default Value: | normal |
---|---|
Applies To: | All Elements |
Inheritance: | None |
Animatable: | No.See Animation Properties. |
Version: | CSS 2,3 |
JavaScript Syntax: | object.style.unicodeBidi="bidi-override" |
Note:In most cases, this attribute can only be set byDTDDesigners use. Especially, authors, web designers, and users should not override it.
The syntax of this attribute is as follows:
direction: bidi-override | embed | normal | initial | inherit
The following example demonstrates how to use the direction attribute.
p { unicode-bidi: bidi-override; direction: rtl; }Test see‹/›
The following table describes the value of this attribute.
Value | Description |
---|---|
bidi-override | For inline elements, this will create a replacement. For block container elements, this will create replacements for inline-level descendants that are not within another block container element. This means that within the element, it is strictly followed byDirectionAttribute for reordering; the implicit part of the bidirectional algorithm will be ignored. |
embed | If the element is inline, this value opens an additional embedding level relative to the bidirectional algorithm. The direction of this embedding level is determined byDirectionAttribute specification. |
normal | For bidirectional algorithms, this value does not provide additional embedding levels. For inline elements, implicit reordering can cross element boundaries. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements adopt the unicode of their parent element.-bidi attribute values. |
unicode-Browser compatibility of bidi attributes, the numbers in the following table represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS Text.
Related Properties:Direction.