目录

direction

描述 (Description)

direction指示要在元素的渲染中使用的书写方向。

可能的值 (Possible Values)

  • ltr - 元素将从左到右呈现。

  • rtl - 元素将从右到左呈现。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.direction = "ltr";

例子 (Example)

这是一个例子 -

<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> 

这将产生以下结果 -

新页面打开
↑回到顶部↑
WIKI教程 @2018