?
This document uses PHP Chinese website manual Release
direction:ltr | rtl
默認(rèn)值:ltr
適用于:所有元素
繼承性:有
動(dòng)畫性:否
計(jì)算值:特定值
ltr:文本流從左到右。
rtl:文本流從右到左。
當(dāng)指定一個(gè)內(nèi)聯(lián)元素的 <' unicode-bidi '> 屬性為normal
時(shí), <' direction '> 屬性設(shè)置不影響bidi重排序,即其設(shè)置不生效。
對(duì)應(yīng)的腳本特性為direction。
Values | IE | Firefox | Chrome | Safari | Opera | iOS Safari | Android Browser | Android Chrome |
---|---|---|---|---|---|---|---|---|
Basic Support | 6.0+ | 2.0+ | 4.0+ | 6.0+ | 15.0+ | 6.0+ | 2.1+ | 18.0+ |
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>direction_CSS參考手冊(cè)_web前端開發(fā)參考手冊(cè)系列</title> <meta name="author" content="Joy Du(飄零霧雨), dooyoe@gmail.com, www.doyoe.com" /> <style> .test p{width:320px;margin:15px 0;border:1px solid #000;} .ltr p{direction:ltr;} .rtl p{direction:rtl;unicode-bidi:bidi-override;} </style> </head> <body> <ul class="test"> <li class="ltr"> <strong>ltr:</strong> <p>本段文字將按照從左到右的方向進(jìn)行流動(dòng)。</p> </li> <li class="rtl"> <strong>rtl:</strong> <p>本段文字將按照從右到左的方向進(jìn)行流動(dòng)。</p> </li> </ul> </body> </html>
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例