text-orientation
描述
text-orientation CSS 属性设置一行中文本字符的方向。它仅影响垂直模式下的文本(当 writing-mode 不是 horizontal-tb 时)。它对于控制使用垂直脚本的语言的显示以及制作垂直表标题很有用。
效果展示
语法
css
/* Keyword values */
text-orientation: mixed;
text-orientation: upright;
text-orientation: sideways-right;
text-orientation: sideways;
text-orientation: use-glyph-orientation;值
- mixed 将横排文字的字符顺时针旋转 90°。自然地排列竖行文字。默认值。
- upright 自然地(直立)布置水平文字的字符以及垂直文字的字形。请注意,此关键字会导致所有字符被视为从左到右: direction 的使用值强制为 ltr 。
- sideways 使字符按水平布局,但整行顺时针旋转 90°。
- sideways-right sideways 的别名,出于兼容性目的而保留。
- use-glyph-orientation 在 SVG 元素上,此关键字导致使用已弃用的 SVG 属性 glyph-orientation-vertical 和 glyph-orientation-horizontal 的值。
