文字方向

div {
    direction: ltr; /* Default, text read read from left-to-right */
}
.ex {
    direction: rtl; /* text read from right-to-left */
}
.horizontal-tb {
    writing-mode: horizontal-tb; /* Default, text read from left-to-right and top-to-bottom. */
}
.vertical-rtl {
    writing-mode: vertical-rl; /* text read from right-to-left and top-to-bottom */
}
.vertical-ltr {
    writing-mode: vertical-rl; /* text read from left-to-right and top to bottom */
}

direction 属性用于更改元素的水平文本方向。

语法:direction: ltr | rtl | initial | inherit;

writing-mode 属性更改文本的对齐方式,因此可以从上到下或从左到右读取,具体取决于语言。

语法:direction: horizontal-tb | vertical-rl | vertical-lr;