Css-direction
提供:Dev Guides
CSS-方向
説明
_direction_は、要素のレンダリングで使用される書き込み方向を示します。
可能な値
- ltr -要素は左から右にレンダリングされます。
- rtl -要素は右から左にレンダリングされます。
に適用されます
すべてのHTML要素。
DOM構文
object.style.direction = "ltr";
例
ここに例があります-
<html>
<head>
</head>
<body>
<p style = "direction:rtl;">
Right-to-left rendering direction - Example
</p>
<p style = "direction:ltr;">
Left-to-right rendering direction - Example
</p>
</body>
</html>
これにより、次の結果が生成されます–