writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress.
Overview tablehorizontal-tb
writingMode
writing-mode: horizontal-tb
writing-mode: vertical-lr
writing-mode: vertical-rl
Sets the writing mode to vertical and to progress from right to left. Sometimes used by East Asian, especially Japanese and Chinese. This example is Japanese use case.
<p>日本では、新聞や書籍などで縦書きを使用することがあります。これは、縦書きのシンプルな例です。</p>
p {
width: 100%;
-webkit-writing-mode: vertical-rl;
}
Sets the writing mode, including a fallback for the previous version of the spec, supported by IE.
writing-mode: horizontal-tb;
-ms-writing-mode: lr-tb;
writing-mode: horizontal-tb;
-ms-writing-mode: rl-tb;
direction: rtl;
writing-mode: vertical-rl;
-ms-writing-mode: tb-rl;
writing-mode: vertical-lr;
-ms-writing-mode: tb-lr;
Complete example, including HTML.
<style>
#horizontal-tb {
-ms-writing-mode: lr-tb;
writing-mode: horizontal-tb;
}
#horizontal-tb-direction-rtl {
-ms-writing-mode: rl-tb;
writing-mode: horizontal-tb;
direction: rtl;
}
#vertical-rl {
-ms-writing-mode: tb-rl;
writing-mode: vertical-rl;
}
#vertical-lr {
-ms-writing-mode: tb-lr;
writing-mode: vertical-lr;
}
</style>
<div id="horizontal-tb">
<h1>Writing-mode: horizontal-tb/lr-tb</h1>
<p>This text should be horizontal, left to right, and <em>under</em> the heading.</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
</div>
<div id="horizontal-tb-direction-rtl">
<h1>Writing-mode: horizontal-tb/rl-tb, direction: rtl</h1>
<p>This text should be horizontal, right to left, and <em>under</em> the heading.</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
</div>
<div id="vertical-rl">
<h1>Writing-mode: vertical-rl/tb-rl</h1>
<p>This text should be vertical, and to the <em>left</em> of the heading.</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
</div>
<div id="vertical-lr">
<h1>Writing-mode: vertical-lr/tb-lr</h1>
<p>This text should be vertical, and to the <em>right</em> of the heading.</p>
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
</div>
Related specifications
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4