CSS writing-mode Property
Example
Specify whether lines of text are laid out horizontally or vertically:
p.test1 {
writing-mode: horizontal-tb;
}
p.test2 {
writing-mode: vertical-rl;
}
span.test2 {
writing-mode:
vertical-rl;
}
Try it Yourself »
Definition and Usage
The writing-mode
property specifies whether lines of text are laid out horizontally or vertically.
Default value: | horizontal-tb |
---|---|
Inherited: | yes |
Animatable: | no. Read about animatable |
Version: | CSS3 |
JavaScript syntax: | object.style.writingMode="vertical-rl" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
writing-mode | 48.0 | 12.0 | 41.0 | 11.0 | 35.0 |
CSS Syntax
writing-mode: horizontal-tb|vertical-rl|vertical-lr;
Property Values
Value | Description |
---|---|
horizontal-tb | Let the content flow horizontally from left to right, vertically from top to bottom |
vertical-rl | Let the content flow vertically from top to bottom, horizontally from right to left |
vertical-lr | Let the content flow vertically from top to bottom, horizontally from left to right |
Related Pages
CSS tutorial: CSS Text Effects