unicode-bidi

CSS unicode-bidi Property

The unicode-bidi property specifies the behavior of the bidirectional text in a document.

The unicode-bidi property allows to override the Unicode algorithm and control the text embedding. The unicode-bidi property should not be overridden by users, authors, and web designers. It should commonly be used by DTD designers.

This property works only with the direction property.

The unicode-bidi and the direction properties are the only properties that are not affected by all property.

类目类目
Initial Valuenormal
Applies toAll elements, though some values have no effect on non-inline elements.
InheritedYes.
AnimatableNo.
VersionCSS2
DOM Syntaxobject.style.unicodeBidi = “isolate”;

Syntax

Syntax

unicode-bidi: normal | embed | bidi-override | isolate | isolate-override | plaintext | initial | inherit;

Example of the unicode-bidi property:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div.text {
        direction: rtl;
        unicode-bidi: embed;
      }
    </style>
  </head>
  <body>
    <h2>Unicode-bidi property example</h2>
    <div>Normal writing direction.</div>
    <div class="text">Using "embed" value.</div>
  </body>
</html>

Example of the unicode-bidi property with the “bidi-override” value:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div.text {
        direction: rtl;
        unicode-bidi: bidi-override;
      }
    </style>
  </head>
  <body>
    <h2>Unicode-bidi property example</h2>
    <div>Normal writing direction.</div>
    <div class="text">Using "bidi-override" value.</div>
  </body>
</html>

Values

Values

ValueDescriptionPlay it
normalDoes not suggest an additional level of embedding.Play it »
embedOpens an additional level of embedding in case the element is inline.Play it »
bidi-overrideCreates an override for an inline element. For block container elements this value creates an override for inline-level descendants.Play it »
isolateThe element is isolated from its siblings. This value specifies that the element’s container directionality should be calculated without considering the content of this element.
isolate-overrideApplies the isolation behavior to the surrounding content and the override behavior to the inner content.
plaintextThis value behaves as isolate value but the directionality is calculated using the P2 and P3 rules of the Unicode Bidirectional Algorithm.
initialSets the property to its default value.Play it »
inheritInherits the property from its parent element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部