text-orientationプロパティ
text-orientationプロパティは、縦書きテキストwriting-mode:vertical-rl;においてのフォントの向き(回転)を指定するプロパティです。
主に英数字の向きを設定します。
SafariとOperaブラウザはベンダープリフィックスが必要です。
-webkit-writing-mode: vertical-rl; -ms-writing-mode: tb-rl; writing-mode: vertical-rl; -webkit-text-orientation: upright; -o-text-orientation: upright; text-orientation: upright;
関連するプロパティ
以下のような関連するプロパティがあります。
direction | テキストの右寄せ、左寄せ |
unicode-bidi | |
writing-mode | テキストの記述方向 |
構文(Syntax)
CSS
text-orientation: mixed | upright | sideways-right | sideways | use-glyph-orientation | initial | inherit;
DOM(JavaScript)
String = object.style.textOrientation;
object.style.textOrientation="mixed | upright | sideways-right | sideways | use-glyph-orientation | initial | inherit";
値(Values)
Value | 摘要 |
---|---|
mixed | 初期値(default値)、縦書きに対応した言語は縦書きに、横書きの言語は行ごと右に90°回転 |
upright | 文字を縦書きの向きに |
sideways-right | 行ごと右に90°回転、sidewaysの別名 |
sideways | 行ごと右に90°回転 |
use-glyph-orientation | SVG専用の設定値 |
initial | 初期値に戻す |
inherit | 親エレメントのプロパティを継承 |
備考(Remarks)
初期値(Default value) | mixed |
継承(Inherited) | Yes |
CSS Animation | No |
Example
text-orientationの例です。エレメント内は右から縦書きに設定しています。英数字は値をupright、縦書き用に指定してあります。 ベンダープリフィックスを付加しています
上側にtext-orientationの指定あり。下側に指定なしを表示しています。
関連(Related)
HTML、CSS、DOMのテキスト、フォント、編集用途の一覧です。
HTML
- リンク
- <a>
- テキスト
- <br>、 <h2-h6>、 <hr>、 <p>
- マーカー
- <mark>
- 書式方向
- <bdi>、 <bdo>
- 単語の扱い
- <wbr>
- プログラムコード例
- <code>、 <kbd>、 <pre>、 <samp>、 <var>
- 化学式、数式
- <sub>、 <sup>
- 削除された内容や追記された内容の補足
- <del>、 <ins>
- 引用や定義、出典を明示
- <abbr>、 <address>、 <blockquote>、 <q>、 <cite>、 <dfn>
- 日時
- <time>
- ?データ用?
- <data>
- スカラー値、ゲージ
- <meter>、 <progress>
- ルビ
- <rp>、 <rt>、 <ruby>
CSS
- フォント
- color、 font、 font-family、 font-feature-settings、 font-kerning、 font-size、 font-stretch、 font-style、 font-variant、 font-variant-caps、 font-weight
- テキスト配置
- letter-spacing、 line-height、 overflow-wrap、 tab-size、 text-align、 text-align-last、 text-combine-upright、 text-indent、 text-justify、 text-overflow、 vertical-align、 white-space、 word-break、 word-spacing、 word-wrap
- 回り込み
- clear、 float
- テキスト装飾
- text-decoration、 text-decoration-color、 text-decoration-line、 text-decoration-style、 text-shadow、 text-transform、 text-underline-position
- 書式方向
- direction、 text-orientation、 writing-mode
- 自動挿入
- content、 counter-increment、 counter-reset、 quotes
- 改行
- box-decoration-break、 hyphens
- ユーザー操作
- user-select
DOM
- インターフェイス
- ClipboardEvent
- イベント
- copy、 cut、 paste
- プロパティ
- メソッド