--- title: text-orientation slug: Web/CSS/text-orientation tags: - CSS - CSS プロパティ - CSS 書字方向 - Reference - 日本語処理 translation_of: Web/CSS/text-orientation ---
text-orientation は CSS のプロパティで、行内のテキストの向きを設定します。このプロパティは縦書きのテキスト ({{cssxref("writing-mode")}} が horizontal-tb 以外の場合) でのみ効果があります。これは縦書きを使用する言語の表示を制御したり、縦書きの表見出しを作成したりするのに有用です。
このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 https://github.com/mdn/interactive-examples をクローンしてプルリクエストを送信してください。
/* キーワード値 */ text-orientation: mixed; text-orientation: upright; text-orientation: sideways-right; text-orientation: sideways; text-orientation: use-glyph-orientation; /* グローバル値 */ text-orientation: inherit; text-orientation: initial; text-orientation: unset;
text-orientation プロパティは、以下のリストから単一のキーワードとして指定されます。
mixeduprightltr が指定されているものとします。sidewaysvertical-rl の場合は右へ回転、vertical-lr の場合は左へ回転します。sideways-rightsideways の別名です。use-glyph-orientationglyph-orientation-vertical と glyph-orientation-horizontal の値を使用します。<p>Lorem ipsum dolet semper quisquam.</p>
p {
writing-mode: vertical-rl;
text-orientation: upright;
}
{{EmbedLiveSample('Examples')}}
| 仕様書 | 状態 | 備考 |
|---|---|---|
| {{SpecName('CSS3 Writing Modes', '#text-orientation', 'text-orientation')}} | {{Spec2('CSS3 Writing Modes')}} | 初回定義 |
{{cssinfo}}
{{Compat("css.properties.text-orientation")}}