The text-orientation property

The text-orientation property specifies an orientation of characters in vertical text, i.e. text that is given the writing-mode property with the vertical-lr or vertical-rl values. The property takes two values: mixed (symbols are rotated 90° clockwise) or upright (symbols are placed one below the other).

Syntax

cssselector {
  text-orientation: mixed or upright;
}

Example

Let's give all vertical text characters a rotation of 90°:

html<p>
  Text
</p>
cssbody {
  width: 200px;
  height: 100px;
}
p {
  text-orientation: mixed;
  background: #467CBC;
  color: white;
  padding: 10px;
  font-size: 2rem;
  writing-mode: vertical-lr;
}

Результат:

Example

Let's place all the vertical text characters below each other:

html<p>
  Text
</p>
cssbody {
  width: 200px;
  height: 100px;
}
p {
  text-orientation: upright;
  background: #467CBC;
  color: white;
  padding: 10px;
  font-size: 2rem;
  writing-mode: vertical-lr;
}

Результат:

See also