aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/css/writing-mode/index.html
blob: 1b828cbce43286f9390ef90215cf420d7358bf00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
title: writing-mode
slug: Web/CSS/writing-mode
translation_of: Web/CSS/writing-mode
---
<p>{{CSSRef}}{{SeeCompatTable}}</p>

<h2 id="Summary">Summary</h2>

<p>Свойство <strong><code>writing-mode</code></strong> устанавливает горизонтальное или вертикальное положение текста также как и направление блока.</p>

<p>Свойство определяет направление потока блока, в каком направлении складываются контейнеры уровня блока и направление в котором инлайновый контент находится в родительском блоке. Также свойство <code>writing-mode</code> определяет порядок контента блочного уровня.</p>

<p>{{cssinfo}}</p>

<h2 id="Синтаксис">Синтаксис</h2>

<pre class="brush:css">/* Keyword values */
writing-mode: horizontal-tb;
writing-mode: horizontal-bt;
writing-mode: vertical-rl;
writing-mode: vertical-lr;

/* Global values */
writing-mode: inherit;
writing-mode: initial;
writing-mode: unset;
</pre>

<h3 id="Значения">Значения</h3>

<dl>
 <dt><code>horizontal-tb</code></dt>
 <dd>Content flows horizontally from left to right, vertically from top to bottom. The next horizontal line is positioned below the previous line.</dd>
 <dt><code>horizontal-bt</code></dt>
 <dd>Content flows horizontally from left to right, vertically from bottom to top. The next horizontal line is positioned above the previous line.</dd>
 <dt><code>vertical-rl</code></dt>
 <dd>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.</dd>
 <dt><code>vertical-lr</code></dt>
 <dd>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.</dd>
 <dt><code>lr</code> {{deprecated_inline}}</dt>
 <dd>Deprecated except for SVG1 documents. For CSS, use <code>horizontal-tb</code>.</dd>
 <dt><code>lr-tb</code> {{deprecated_inline}}</dt>
 <dd>Deprecated except for SVG1 documents. For CSS, use <code>horizontal-tb</code>.</dd>
 <dt><code>rl</code> {{deprecated_inline}}</dt>
 <dd>Deprecated except for SVG1 documents. For CSS, use <code>horizontal-tb</code>.</dd>
 <dt><code>tb</code> {{deprecated_inline}}</dt>
 <dd>Deprecated except for SVG1 documents. For CSS, use <code>vertical-rl</code>.</dd>
 <dt><code>tb-rl</code> {{deprecated_inline}}</dt>
 <dd>Deprecated except for SVG1 documents. For CSS, use <code>vertical-rl</code>.</dd>
</dl>

<h3 id="Formal_syntax">Formal syntax</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Пример">Пример</h2>

<pre class="brush: html">&lt;p class="exampleText"&gt;Example text&lt;/p&gt;
</pre>

<pre class="brush: css">.exampleText {
  writing-mode: vertical-rl;
}</pre>

<p>{{EmbedLiveSample("Example", 100, 160)}}</p>

<h2 id="Specification">Specification</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS3 Writing Modes", "#block-flow", "writing-mode")}}</td>
   <td>{{Spec2("CSS3 Writing Modes")}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
   <td>{{CompatGeckoDesktop(41)}}<sup>[1]</sup></td>
   <td>9.0 {{property_prefix("-ms")}}<sup>[2]</sup></td>
   <td>{{CompatVersionUnknown}} {{property_prefix("-webkit")}}</td>
   <td>8.0 {{property_prefix("-webkit")}}</td>
  </tr>
  <tr>
   <td>SVG 1.1 values <code>lr</code>, <code>lr-tb</code>, <code>rl</code>, <code>tb</code>, <code>tb-rl</code></td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatNo}}</td>
   <td>9.0 {{property_prefix("-ms")}}<sup>[2]</sup></td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatGeckoMobile(41)}} <sup>[1]</sup></td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>8.0 {{property_prefix("-webkit")}}</td>
  </tr>
  <tr>
   <td>SVG 1.1 values <code>lr</code>, <code>lr-tb</code>, <code>rl</code>, <code>tb</code>, <code>tb-rl</code></td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>[1] An experimental implementation was available since Gecko 36. It is governed by the preference <code>layout.css.vertical-text.enabled</code>, defaulting to <code>false</code> until Firefox 38. From Firefox 39 and Firefox 40, the preference was <code>true</code> for Nightly and DevTools editions only. Note that not all CSS widgets (e.g. tables) obey to it, yet.</p>

<p>[2] The implementation in Internet Explorer differs from the specification. See the <a href="https://msdn.microsoft.com/en-us/library/ie/ms531187%28v=vs.85%29.aspx">related article in the Internet Explorer Dev Center</a>.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>SVG <code><a href="/en-US/docs/Web/SVG/Attribute/writing-mode">writing-mode</a></code> attribute</li>
 <li>{{Cssxref("direction")}}</li>
 <li>{{Cssxref("unicode-bidi")}}</li>
</ul>