Css-direction

提供:Dev Guides
2020年6月22日 (月) 22:39時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

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>

これにより、次の結果が生成されます–