Перевод не завершен. Пожалуйста, помогите перевести эту статью с английского.
This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
Summary
The writing-mode
property defines whether lines of text are laid out horizontally or vertically and the direction in which blocks progress.
The property specifies the block flow direction, which is the direction in which block-level containers are stacked, and the direction in which inline-level content flows within a block container. Thus the writing-mode
property also determines the ordering of block-level content.
Initial value | horizontal-tb |
---|---|
Applies to | all elements except table row groups, table column groups, table rows, and table columns |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animatable | no |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
Syntax
/* Keyword values */ writing-mode: horizontal-tb; writting-mode: horizontal-bt; writing-mode: vertical-rl; writing-mode: vertical-lr; /* Global values */ writing-mode: inherit; writing-mode: initial; writing-mode: unset;
Values
horizontal-tb
- Content flows horizontally from left to right, vertically from top to bottom. The next horizontal line is positioned below the previous line.
horizontal-bt
- Content flows horizontally from left to right, vertically from bottom to top. The next horizontal line is positioned above the previous line.
vertical-rl
- Content flows vertically from top to bottom, horizontally from right to left. The next vertical line is positioned to the left of the previous line.
vertical-lr
- Content flows vertically from top to bottom, horizontally from left to right. The next vertical line is positioned to the right of the previous line.
lr
- Deprecated except for SVG1 documents. For CSS, use
horizontal-tb
. lr-tb
- Deprecated except for SVG1 documents. For CSS, use
horizontal-tb
. rl
- Deprecated except for SVG1 documents. For CSS, use
horizontal-tb
. tb
- Deprecated except for SVG1 documents. For CSS, use
vertical-rl
. tb-rl
- Deprecated except for SVG1 documents. For CSS, use
vertical-rl
.
Formal syntax
horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr
Example
<p class="exampleText">Example text</p>
.exampleText { writing-mode: vertical-rl; }
Specification
Specification | Status | Comment |
---|---|---|
CSS Writing Modes Module Level 3 Определение 'writing-mode' в этой спецификации. |
Кандидат в рекомендации | Initial definition |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Да) -webkit | 41 (41)[1] | 9.0 -ms[2] | (Да) -webkit | 8.0 -webkit |
SVG 1.1 values lr , lr-tb , rl , tb , tb-rl |
(Да) | Нет | 9.0 -ms[2] | (Да) | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | (Да) | 41.0 (41) [1] | ? | ? | 8.0 -webkit |
SVG 1.1 values lr , lr-tb , rl , tb , tb-rl |
? | ? | Нет | ? | ? | ? |
[1] An experimental implementation was available since Gecko 36. It is governed by the preference layout.css.vertical-text.enabled
, defaulting to false
until Firefox 38. From Firefox 39 and Firefox 40, the preference was true
for Nightly and DevTools editions only. Note that not all CSS widgets (e.g. tables) obey to it, yet.
[2] The implementation in Internet Explorer differs from the specification. See the related article in the Internet Explorer Dev Center.
See also
- SVG
writing-mode
attribute direction
unicode-bidi