示例
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;