aboutsummaryrefslogtreecommitdiff
path: root/files/ru/web/css/align-self
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:52 -0500
commit074785cea106179cb3305637055ab0a009ca74f2 (patch)
treee6ae371cccd642aa2b67f39752a2cdf1fd4eb040 /files/ru/web/css/align-self
parentda78a9e329e272dedb2400b79a3bdeebff387d47 (diff)
downloadtranslated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.gz
translated-content-074785cea106179cb3305637055ab0a009ca74f2.tar.bz2
translated-content-074785cea106179cb3305637055ab0a009ca74f2.zip
initial commit
Diffstat (limited to 'files/ru/web/css/align-self')
-rw-r--r--files/ru/web/css/align-self/index.html138
1 files changed, 138 insertions, 0 deletions
diff --git a/files/ru/web/css/align-self/index.html b/files/ru/web/css/align-self/index.html
new file mode 100644
index 0000000000..829e7c10ff
--- /dev/null
+++ b/files/ru/web/css/align-self/index.html
@@ -0,0 +1,138 @@
+---
+title: align-self
+slug: Web/CSS/align-self
+tags:
+ - CSS
+ - flexbox
+ - Свойства
+translation_of: Web/CSS/align-self
+---
+<p>{{CSSRef}}</p>
+
+<h2 id="Описание">Описание</h2>
+
+<p>Свойство <a href="/en-US/docs/CSS" title="CSS">CSS</a> <strong><code>align-self</code></strong> выравнивает flex-элементы по текущей flex-линии, переопределяя значение свойства <a href="/en/CSS/align-items" title="en/CSS/flex-align"><code>align-items</code></a>. Если у какого-либо flex-элемента <strong>margin</strong> в поперечной оси выставлен в <code>auto</code>, то <code>align-self</code> игнорируется.</p>
+
+<p>{{cssinfo}}</p>
+
+<p>Данное свойство не применяется к block-level boxes и к ячейкам таблицы</p>
+
+<p>Подробнее и больше информации читайте в <a href="/en/CSS/Using_CSS_flexible_boxes" title="/en/CSS/Using_CSS_flexible_boxes">Using CSS flexible boxes</a>.</p>
+
+<h2 id="Синтаксис">Синтаксис</h2>
+
+<pre class="brush: css no-line-numbers language-css"><code class="language-css"><span class="comment token">/* Keyword values */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> auto<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> normal<span class="punctuation token">;</span>
+
+<span class="comment token">/* Positional alignment */</span>
+<span class="comment token">/* align-self does not take left and right values */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> center<span class="punctuation token">;</span> <span class="comment token">/* Put the item around the center */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> start<span class="punctuation token">;</span> <span class="comment token">/* Put the item at the start */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> end<span class="punctuation token">;</span> <span class="comment token">/* Put the item at the end */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> self-start<span class="punctuation token">;</span> <span class="comment token">/* Align the item flush at the start */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> self-end<span class="punctuation token">;</span> <span class="comment token">/* Align the item flush at the end */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> flex-start<span class="punctuation token">;</span> <span class="comment token">/* Put the flex item at the start */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> flex-end<span class="punctuation token">;</span> <span class="comment token">/* Put the flex item at the end */</span>
+
+<span class="comment token">/* Baseline alignment */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> baseline<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> first baseline<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> last baseline<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> stretch<span class="punctuation token">;</span> <span class="comment token">/* Stretch 'auto'-sized items to fit the container */</span>
+
+<span class="comment token">/* Overflow alignment */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> safe center<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> unsafe center<span class="punctuation token">;</span>
+
+<span class="comment token">/* Global values */</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> inherit<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> initial<span class="punctuation token">;</span>
+<span class="property token">align-self</span><span class="punctuation token">:</span> unset<span class="punctuation token">;</span></code></pre>
+
+<h3 id="Значения">Значения</h3>
+
+<dl>
+ <dt><code>auto</code></dt>
+ <dd>Computes to the parent's {{cssxref("align-items")}} value.</dd>
+ <dt><code>normal</code></dt>
+ <dd>The effect of this keyword is dependent of the layout mode we are in:
+ <ul>
+ <li>In absolutely-positioned layouts, the keyword behaves like <code>start</code> on <em>replaced</em> absolutely-positioned boxes, and as <code>stretch</code> on <em>all other</em> absolutely-positioned boxes.</li>
+ <li>In static position of absolutely-positioned layouts, the keyword behaves as <code>stretch</code>.</li>
+ <li>For flex items, the keyword behaves as <code>stretch</code>.</li>
+ <li>For grid items, this keyword leads to a behavior similar to the one of <code>stretch</code>, except for boxes with an aspect ratio or an intrinsic sizes where it behaves like <code>start</code>.</li>
+ <li>The property doesn't apply to block-level boxes, and to table cells.</li>
+ </ul>
+ </dd>
+ <dt><code>self-start</code></dt>
+ <dd>Aligns the items to be flush with the edge of the alignment container corresponding to the item's start side in the cross axis.</dd>
+ <dt><code>self-end</code></dt>
+ <dd>Aligns the items to be flush with the edge of the alignment container corresponding to the item's end side in the cross axis.</dd>
+ <dt><code>flex-start</code></dt>
+ <dd>The cross-start margin edge of the flex item is flushed with the cross-start edge of the line.</dd>
+ <dt><code>flex-end</code></dt>
+ <dd>The cross-end margin edge of the flex item is flushed with the cross-end edge of the line.</dd>
+ <dt><code>center</code></dt>
+ <dd>The flex item's margin box is centered within the line on the cross-axis. If the cross-size of the item is larger than the flex container, it will overflow equally in both directions.</dd>
+ <dt><code>baseline<br>
+ first baseline</code><br>
+ <code>last baseline</code></dt>
+ <dd>Specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the box’s first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the boxes in its baseline-sharing group.<br>
+ The fallback alignment for <code>first baseline</code> is <code>start</code>, the one for <code>last baseline</code> is <code>end</code>.</dd>
+ <dt><code>stretch</code></dt>
+ <dd>If the combined size of the items along the cross axis is less than the size of the alignment container and the item is <code>auto</code>-sized, its size is increased equally (not proportionally), while still respecting the constraints imposed by {{cssxref("max-height")}}/{{cssxref("max-width")}} (or equivalent functionality), so that the combined size of all <code>auto</code>-sized items exactly fills the alignment container along the cross axis.</dd>
+ <dt><code>safe</code></dt>
+ <dd>If the size of the item overflows the alignment container, the item is instead aligned as if the alignment mode were <code>start</code>.</dd>
+ <dt><code>unsafe</code></dt>
+ <dd>Regardless of the relative sizes of the item and alignment container, the given alignment value is honored.</dd>
+ <dd> </dd>
+</dl>
+
+<h3 id="Формальный_синтаксис">Формальный синтаксис</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="Спецификации">Спецификации</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 Box Alignment', '#align-self-property', 'align-self') }}</td>
+ <td>{{ Spec2('CSS3 Box Alignment') }}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Совместимость_с_браузерами">Совместимость с браузерами</h2>
+
+
+
+<h3 id="Support_in_Flex_layout">Support in Flex layout</h3>
+
+<p>{{Compat("css.properties.align-self.flex_context")}}</p>
+
+<h3 id="Support_in_Grid_layout">Support in Grid layout</h3>
+
+<p>{{Compat("css.properties.align-self.grid_context")}}</p>
+
+<div>{{CSSRef}}</div>
+
+<h2 id="Смотрите_также">Смотрите также</h2>
+
+<ul>
+ <li><a href="/en-US/docs/CSS/Using_CSS_flexible_boxes" title="/en-US/docs/CSS/Using_CSS_flexible_boxes">Using CSS flexible boxes</a></li>
+ <li>CSS Flexbox Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox">Basic Concepts of Flexbox</a></em></li>
+ <li>CSS Flexbox Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container">Aligning items in a flex container</a></em></li>
+ <li>CSS Grid Guide: <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout">Box alignment in CSS Grid layouts</a></em></li>
+ <li><a href="/en-US/docs/Web/CSS/CSS_Box_Alignment">CSS Box Alignment</a></li>
+ <li>The {{cssxref("align-items")}} property</li>
+</ul>