CSS方向プロパティ
例
テキストの方向を「右から左」に設定します。
p.rtl
{
direction: rtl;
}
定義と使用法
このdirection
プロパティは、ブロックレベルの要素内のテキストの方向/書き込み方向を指定します。
ヒント:このプロパティを unicode-bidiプロパティと一緒に使用して、同じドキュメントで複数の言語をサポートするためにテキストをオーバーライドするかどうかを設定または返します。
デフォルト値: | ltr |
---|---|
遺伝性の: | はい |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS2 |
JavaScript構文: | オブジェクト.style.direction = "rtl" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
direction | 2.0 | 5.5 | 1.0 | 1.3 | 9.2 |
CSS構文
direction: ltr|rtl|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
ltr | Text direction goes from left-to-right. This is default | |
rtl | Text direction goes from right-to-left | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSテキスト
HTML DOMリファレンス:方向プロパティ