{"id":277958,"date":"2016-04-09T02:10:04","date_gmt":"2016-04-08T22:10:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277958"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277958","title":{"rendered":"\u041f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e flexbox (\u0431\u0435\u0437 \u0441\u0430\u043c\u0438\u0445 flexbox)"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/946\/afc\/fd6\/946afcfd613e5c5040ee3d9cb412a218.png\" alt=\"image\"\/><\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\/\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 flexbox. \u042d\u0442\u043e \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u0433\u0430 \u0430-\u043b\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 flexbox.<\/p>\n<p>  \u0425\u043e\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 CSS-\u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c, \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 flexbox, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u043e\u0431\u0440\u0451\u043b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<ol>\n<li><a href=\"#flex-direction\">flex-direction<\/a><\/li>\n<li><a href=\"#flex-wrap\">flex-wrap<\/a><\/li>\n<li><a href=\"#justify-content\">justify-content<\/a><\/li>\n<li><a href=\"#align-items\">align-items<\/a><\/li>\n<li><a href=\"#align-content\">align-content<\/a><\/li>\n<li><a href=\"#flex-items\">flex items<\/a><\/li>\n<\/ol>\n<h2>1. flex-direction<\/h2>\n<h3>row<\/h3>\n<p>  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e<\/p>\n<pre><code class=\"css\">.item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/160\/38f\/9f6\/16038f9f60a8856f673f0bf3cd67123a.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/xVpQmG\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>row-reverse<\/h3>\n<p>  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/p>\n<pre><code class=\"css\">.container { \tdirection: rtl; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7a0\/cb7\/100\/7a0cb7100c172bd97f0669bde6aea308.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/MyrzdR\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>column<\/h3>\n<p>  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e<\/p>\n<pre><code class=\"css\">.item { \tdisplay: block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c33\/c9c\/c82\/c33c9cc8288fc61f40c6ea810476fc91.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/LNeMYb\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>column-reverse<\/h3>\n<p>  \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/p>\n<pre><code class=\"css\">.container, .item { \ttransform: scaleY(-1); \t-ms-transform: scaleY(-1); \t-webkit-transform: scaleY(-1); }  .item { \tdisplay: block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/493\/314\/c14\/493314c147bca3f797764eeaa4871596.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/KzZbKE\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h2>2. flex-wrap<\/h2>\n<h3>nowrap<\/h3>\n<p>  \u0421\u0443\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430<\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f69\/d17\/015\/f69d1701572bbb8594051635b1fbaac5.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/XdVoed?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>wrap<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043e\u0431\u0449\u0430\u044f \u0448\u0438\u0440\u0438\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0438\u0440\u0438\u043d\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430  <\/p>\n<pre><code class=\"css\">.item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/207\/aad\/182\/207aad182beb59ca209296ccff6f8477.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/yOpGRY?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>flex-start<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/eb7\/6ab\/296\/eb76ab296f88d782bb067d6fb1a931f2.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/eZybQd?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>flex-end<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.container { \ttext-align: right; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e06\/81a\/b37\/e0681ab370aa11cde85524eb81af03ed.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/zqpyyZ?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<br \/>  <\/a><\/p>\n<h3>center<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430  <\/p>\n<pre><code class=\"css\"> .container { \ttext-align: center; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c86\/8be\/1aa\/c868be1aa00a86ee3d2b9954e787f43e.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/JXMwxr?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>space-between<\/h3>\n<p>  \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0432\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u043a\u0440\u0430\u0439\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u0436\u0430\u0442\u044c\u0441\u044f \u043a \u043a\u0440\u0430\u044f\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.container { \ttext-align: justify; }  .container:after { \tcontent: ''; \tdisplay: inline-block; \twidth: 100%; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/447\/621\/5f4\/4476215f4a537f9f2b7afe463a1adab2.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/wGpRZL?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<blockquote><p> \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0435\u0441\u0436\u0430\u0442\u044b\u043c HTML \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p><\/blockquote>\n<h3>space-around<\/h3>\n<p>  \u0420\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438  <\/p>\n<pre><code class=\"css\"> .container { \tdisplay: table; }  .item { \tdisplay: table-cell; \ttext-align: center; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dd1\/e7e\/d80\/dd1e7ed80f8438510426a1535580033c.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/groZVE?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h2>4. align-items<\/h2>\n<h3>flex-start<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.item { \tdisplay: table-cell; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/250\/50a\/4e1\/25050a4e1ebd7ae832fec328377e63c9.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/wGpNBw?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>flex-end<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; \tvertical-align: bottom; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/514\/3dc\/32f\/5143dc32f5c1068316230b1d1dc93307.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/YqYBPJ?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>center<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0432 \u0446\u0435\u043d\u0442\u0440\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; \tvertical-align: middle; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/650\/a9d\/fe4\/650a9dfe4d22bffac127196ba17e419e.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/ZWvwGL?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>stretch<\/h3>\n<p>  \u0420\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.item { \tdisplay: inline-block; \theight: 100%; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/9dc\/810\/539\/9dc810539b00a3432b7adffde66a0780.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/aNEXvE?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h2>5. align-content<\/h2>\n<p>  <\/p>\n<h3>flex-start<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/458\/440\/096\/458440096a0ea232181234dfef8669b2.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/aNEXdE?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>flex-end<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/p>\n<pre><code class=\"css\">.container { \tdisplay: table-cell; \tvertical-align: bottom; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d99\/d13\/633\/d99d13633f478c28ce05c22396a4cbe1.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/KzZJzM?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>center<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430  <\/p>\n<pre><code class=\"css\">.container { \tdisplay: table-cell; \tvertical-align: middle; }  .item { \tdisplay: inline-block; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5a3\/f1f\/80d\/5a3f1f80d340fac885a10cf546e5b55f.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/BKJMzB?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h2>6. flex items<\/h2>\n<p>  <\/p>\n<h3>flex-grow<\/h3>\n<p>  \u0420\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e  <\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; }  .item.grow { \twidth: 100%; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/65e\/34d\/c21\/65e34dc219b22c20e2a41208040393ae.png\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/ONzdbL?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>flex-shrink<\/h3>\n<p>  \u0421\u0443\u0436\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e  <\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; }  .item.shrink { \twidth: 1px; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/63f\/043\/cd2\/63f043cd24ac4632dedbc02316d3f9d6.png\" alt=\"image\"\/><\/p>\n<p>  <a href=\"http:\/\/codepen.io\/psywalker\/pen\/MyrLpm?editors=1100\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/a><\/p>\n<h3>align-self<\/h3>\n<p>  \u0412\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 (\u0432\u043d\u0438\u0437\u0443 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435)  <\/p>\n<pre><code class=\"css\">.container { \tdisplay: table; }  .item { \tdisplay: table-cell; }  .item.bottom { \tvertical-align: bottom; } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/1e6\/769\/5ca\/1e67695ca5d4b12754e2f47d46033e5d.png\" alt=\"image\"\/>       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/281254\/\"> https:\/\/habrahabr.ru\/post\/281254\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/946\/afc\/fd6\/946afcfd613e5c5040ee3d9cb412a218.png\" alt=\"image\"\/><\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0435\u0441\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\/\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u0435 flexbox. \u042d\u0442\u043e \u0448\u043f\u0430\u0440\u0433\u0430\u043b\u0433\u0430 \u0430-\u043b\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0432\u043e\u0439\u0441\u0442\u0432 flexbox.<\/p>\n<p>  \u0425\u043e\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 CSS-\u043a\u043e\u0434 \u0432 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c, \u044f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 flexbox, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u043e\u0431\u0440\u0451\u043b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-277958","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277958"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277958\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}