
- CSS 教程
- CSS - 首頁
- CSS - 路線圖
- CSS - 簡介
- CSS - 語法
- CSS - 選擇器
- CSS - 包含
- CSS - 測量單位
- CSS - 顏色
- CSS - 背景
- CSS - 字型
- CSS - 文字
- CSS - 圖片
- CSS - 連結
- CSS - 表格
- CSS - 邊框
- CSS - 塊級邊框
- CSS - 行內邊框
- CSS - 外邊距
- CSS - 列表
- CSS - 內邊距
- CSS - 游標
- CSS - 輪廓
- CSS - 尺寸
- CSS - 捲軸
- CSS - 行內塊
- CSS - 下拉選單
- CSS - 可見性
- CSS - 溢位
- CSS - 清除浮動
- CSS - 浮動
- CSS - 箭頭
- CSS - 調整大小
- CSS - 引號
- CSS - 順序
- CSS - 位置
- CSS - 連字元
- CSS - 懸停
- CSS - 顯示
- CSS - 聚焦
- CSS - 縮放
- CSS - 位移
- CSS - 高度
- CSS - 連字元字元
- CSS - 寬度
- CSS - 不透明度
- CSS - Z-Index
- CSS - 底部
- CSS - 導航欄
- CSS - 覆蓋層
- CSS - 表單
- CSS - 對齊
- CSS - 圖示
- CSS - 圖片庫
- CSS - 註釋
- CSS - 載入器
- CSS - 屬性選擇器
- CSS - 組合器
- CSS - 根元素
- CSS - 盒模型
- CSS - 計數器
- CSS - 剪裁
- CSS - 書寫模式
- CSS - Unicode 雙向
- CSS - min-content
- CSS - 全部
- CSS - 內嵌
- CSS - 隔離
- CSS - 溢位滾動
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - 指標事件
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - 最大塊級尺寸
- CSS - 最小塊級尺寸
- CSS - 混合模式
- CSS - 最大內聯尺寸
- CSS - 最小內聯尺寸
- CSS - 偏移量
- CSS - 強調色
- CSS - 使用者選擇
- CSS 高階
- CSS - 網格
- CSS - 網格佈局
- CSS - Flexbox
- CSS - 可見性
- CSS - 定位
- CSS - 圖層
- CSS - 偽類
- CSS - 偽元素
- CSS - @規則
- CSS - 文字效果
- CSS - 分頁媒體
- CSS - 列印
- CSS - 佈局
- CSS - 驗證
- CSS - 圖片精靈
- CSS - !important
- CSS - 資料型別
- CSS3 教程
- CSS3 - 教程
- CSS - 圓角
- CSS - 邊框圖片
- CSS - 多背景
- CSS - 顏色
- CSS - 漸變
- CSS - 盒陰影
- CSS - 盒裝飾中斷
- CSS - 游標顏色
- CSS - 文字陰影
- CSS - 文字
- CSS - 二維變換
- CSS - 三維變換
- CSS - 過渡
- CSS - 動畫
- CSS - 多列
- CSS - 盒尺寸
- CSS - 工具提示
- CSS - 按鈕
- CSS - 分頁
- CSS - 變數
- CSS - 媒體查詢
- CSS - 函式
- CSS - 數學函式
- CSS - 遮罩
- CSS - 形狀
- CSS - 圖片樣式
- CSS - 特效性
- CSS - 自定義屬性
- CSS 響應式
- CSS RWD - 簡介
- CSS RWD - 視口
- CSS RWD - 網格檢視
- CSS RWD - 媒體查詢
- CSS RWD - 圖片
- CSS RWD - 影片
- CSS RWD - 框架
- CSS 工具
- CSS - PX 到 EM 轉換器
- CSS - 顏色選擇器和動畫
- CSS 資源
- CSS - 有用資源
- CSS - 討論
CSS - Unicode 雙向屬性
CSS unicode-bidi 屬性用於控制文件中雙向文字的顯示方式。雙向文字包含從左到右 (LTR) 和從右到左 (RTL) 的文字。
unicode-bidi 屬性允許開發人員覆蓋瀏覽器的預設行為,並確保雙向文字正確顯示。
可能的值
normal − 這是預設值,它指定文字應根據文字本身的固有方向顯示。換句話說,它將使用文字中字元的方向來確定其顯示方式。
embed − 此值用於顯式設定元素內文字的方向。當您將 unicode-bidi 設定為 embed 時,還可以使用 direction 屬性指定文字應從左到右 (ltr) 顯示還是從右到左 (rtl) 顯示。
bidi-override − 此值會為內聯元素建立覆蓋。對於塊級元素,它會覆蓋瀏覽器的雙向文字演算法,並根據 direction 屬性嚴格地排列任何內聯子元素內的文字。
isolate − 此值將元素與其同級元素隔離開。
isolate-override − 此值將 isolate 關鍵字的隔離行為應用於周圍內容,並將 bidi-override 關鍵字的覆蓋行為應用於內部內容。
plaintext − 阻止雙向文字 (BIDI) 演算法影響元素內的文字。
應用於
所有定位元素,但某些值對非內聯元素無效。
DOM 語法
object.style.unicodeBidi = "normal|embed|bidi-override|isolate|isolate-override|plaintext";
CSS 屬性 unicode-bidi 和 direction 是不受 all 簡寫屬性影響的唯二屬性。
此屬性僅供文件型別定義 (DTD) 設計人員使用。通常不建議網頁設計師或類似的作者覆蓋它。
CSS unicode-bidi - normal 值
以下示例演示了使用 unicode-bidi: normal,文字按其從右到左方向 (RTL) 的預設順序排列:
<html> <head> <style> .box { direction: rtl; unicode-bidi: normal; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - normal Value</h2> <p>The following text is displayed in its default order from right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - embed 值
以下示例演示了使用 unicode-bidi: embed。此值會將文字的方向嵌入到其周圍內容中,當 direction 設定為 rtl 時,文字將從右到左 (RTL) 顯示:
<html> <head> <style> .box { direction: rtl; unicode-bidi: embed; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - embed Value</h2> <p>The following text is displayed in its default order from right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - bidi-override 值
以下示例演示了使用 unicode-bidi: bidi-override。此值將文字按反向順序顯示,最右側的字元顯示在第一個位置:
<html> <head> <style> .box { direction: rtl; unicode-bidi: bidi-override; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - bidi-override Value</h2> <p>The following text is displayed in reverse order of the characters in right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - isolate 值
以下示例演示了使用 unicode-bidi: isolate。此值用於將雙向文字與其周圍文字隔離開:
<html> <head> <style> .box { direction: rtl; unicode-bidi: isolate; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - isolate Value</h2> <p>The following text is displayed in its default order from right to left.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - isolate-override 值
以下示例演示了使用 unicode-bidi: isolate-override。此值用於隔離並覆蓋雙向文字與其周圍文字:
<html> <head> <style> .box { direction: rtl; unicode-bidi: isolate-override; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - isolate-override Value</h2> <p>The following text is displayed in reverse order of the characters in right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - plaintext 值
以下示例演示了使用 unicode-bidi: plaintext。此值將文字視為純文字,不應用任何雙向文字演算法:
<html> <head> <style> .box { direction: rtl; unicode-bidi: plaintext; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - plaintext Value</h2> <p>The following text is displayed in its default order from left-to-right direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - 相關屬性
以下是與 unicode-bidi 相關的 CSS 屬性列表
屬性 | 值 |
---|---|
direction | 設定塊級元素中文字的方向。 |