CSS unicode-bidi Property

Thuộc tính unicode-bidi trong HTML DOM được dùng cùng với thuộc tính direction. Nó xác định cách văn bản hai chiều được xử lý trong tài liệu.

Cú pháp:

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

Giá trị thuộc tính:

1. normal: Đây là giá trị mặc định. Mức độ nhúng bổ sung không mở ra từ phần tử.

Cú pháp:

unicode-bidi: normal;

Ví dụ:

html
<!DOCTYPE html>
<html>
    
<head>
    <title>
        CSS unicode-bidi Property
    </title>
    
    <!-- style for unicode-bidi property -->
    <style>
        .GFG {
            direction: rtl;
            unicode-bidi: normal;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    
    <h2>
        CSS unicode-bidi Property
    </h2>
    
    <div class = "GFG">
        A computer science portal for geeks
    </div>
</body>

</html>                    

Đầu ra:

 css-unicode-bidi-property

2. embed: Giá trị này được sử dụng để mở một cấp độ nhúng bổ sung.

Cú pháp:

unicode-bidi:embed;

Ví dụ:

html
<!DOCTYPE html>
<html>
    
<head>
    <title>
        CSS unicode-bidi Property
    </title>
    
    <!-- style for unicode-bidi property -->
    <style>
        .GFG {
            direction: rtl;
            unicode-bidi: embed;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    
    <h2>
        CSS unicode-bidi Property
    </h2>
    
    <div class = "GFG">
        A computer science portal for geeks
    </div>
</body>

</html>                    

Đầu ra:

 css-unicode-bidi-property

3. bidi-override: Giá trị này tạo một ghi đè cho phần tử nội tuyến. Trong trường hợp phần tử khối nó tạo một ghi đè cho các phần tử con nội tuyến. Chúng không nằm trong một phần tử khối khác.

Cú pháp:

unicode-bidi:bidi-override;

Ví dụ:

html
<!DOCTYPE html>
<html>
    
<head>
    <title>
        CSS unicode-bidi Property
    </title>
    
    <!-- style for unicode-bidi property -->
    <style>
        .GFG {
            direction: rtl;
            unicode-bidi: bidi-override;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    
    <h2>
        CSS unicode-bidi Property
    </h2>
    
    <div class = "GFG">
        A computer science portal for geeks
    </div>
</body>

</html>                    

Đầu ra:

 css-unicode-bidi-property

4. initial: Nó đặt thuộc tính unicode-bidi về giá trị mặc định của nó.

Cú pháp:

unicode-bidi: initial;

Ví dụ:

html
<!DOCTYPE html>
<html>
    
<head>
    <title>
        CSS unicode-bidi Property
    </title>
    
    <!-- style for unicode-bidi property -->
    <style>
        .GFG {
            direction: rtl;
            unicode-bidi: initial;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    
    <h2>
        CSS unicode-bidi Property
    </h2>
    
    <div class = "GFG">
        A computer science portal for geeks
    </div>
</body>

</html>                    

Đầu ra:

 css-unicode-bidi-property

5. inherit: Thuộc tính unicode-bidi được kế thừa từ phần tử cha của nó.

Cú pháp:

unicode-bidi: inherit;

Ví dụ:

html
<!DOCTYPE html>
<html>
    
<head>
    <title>
        CSS unicode-bidi Property
    </title>
    
    <!-- style for unicode-bidi property -->
    <style>
        .Geeks {
            direction: rtl;
            unicode-bidi: bidi-override;
        }
        .GFG {
            unicode-bidi: inherit;
        }
    </style>
</head>

<body>
    <h1>GeeksforGeeks</h1>
    
    <h2>
        CSS unicode-bidi Property
    </h2>
    
    <div class = "Geeks">
        <div class = "GFG">
            A computer science portal for geeks
        </div>
    </div>
</body>

</html>                    

Đầu ra:

 css-unicode-bidi-property

6. isolate-override: Nó áp dụng hành vi cách ly của từ khóa isolate. Đồng thời áp dụng hành vi ghi đè của bidi-override cho nội dung bên trong.

Cú pháp:

unicode-bidi: isolate-override;

7. plaintext: Nó làm cho hướng của phần tử được tính toán. Việc này không cần xem xét trạng thái hai chiều của phần tử cha. Cũng không cần xét giá trị của thuộc tính direction.

Cú pháp:

unicode-bidi: plaintext;

Các trình duyệt được hỗ trợ: Các trình duyệt được hỗ trợ bởi unicode-bidi property được liệt kê dưới đây:

  • Google Chrome 2.0
  • Edge 12.0
  • Internet Explorer 5.5
  • Firefox 1.0
  • Safari 1.3
  • Opera 9.2

Last Updated : 21/07/2025