{"id":266220,"date":"2015-09-23T12:26:02","date_gmt":"2015-09-23T08:26:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266220"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266220","title":{"rendered":"\u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043a\u0430\u043a \u0444\u043e\u043d \u0448\u0430\u043f\u043a\u0438 \u0441\u0430\u0439\u0442\u0430"},"content":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u043d\u0430. \u0428\u0430\u043f\u043a\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 <strong>background-position: 50% 0<\/strong>. \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043d\u0430 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043e\u043d\u043e \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u0438 \u0441\u043d\u0438\u0437\u0443 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/01c\/b94\/245\/01cb94245bac4ce3a0c07adf3729ebdc.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0432\u0438\u0434\u0435\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043d\u0430\u0448\u0435\u0439 \u0448\u0430\u043f\u043a\u0438 \u0438 \u043f\u043e\u0434\u0433\u043e\u043d\u0438\u043c \u043f\u043e\u0434 \u043d\u0438\u0445 \u043d\u0430\u0448\u0435 \u0432\u0438\u0434\u0435\u043e. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u044b iPad \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0448\u0430\u043f\u043a\u0438 1024*768 (\u043d\u0443 \u0438\u043b\u0438 768 *1024, \u044d\u0442\u043e \u043a\u0430\u043a \u0434\u0435\u0440\u0436\u0430\u0442\u044c). <\/p>\n<p>  \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435.<\/p>\n<p>  <b>HTML<\/b><\/p>\n<pre><code class=\"html\">&lt;div class=&quot;header&quot;&gt;     &lt;div class=&quot;header__video-wrapp&quot;&gt;         &lt;div class=&quot;header__video-box&quot;&gt;            &lt;video class=&quot;header__video&quot;   loop autoplay&gt;                &lt;source src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/coverr\/mp4\/Winter-Grass.mp4&quot; type=&quot;video\/mp4&quot;&gt;               &lt;source src=&quot;https:\/\/s3-us-west-2.amazonaws.com\/coverr\/mp4\/Winter-Grass.mp4&quot; type=&quot;video\/webm&quot;&gt;           &lt;\/video&gt;         &lt;\/div&gt;     &lt;\/div&gt; &lt;\/div&gt; <\/code><\/pre>\n<p>  <b>CSS<\/b><\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0;     width: 100%;     height: 100%; } body {     min-height: 100%; } .header {     width:100%;     height: 100%;     max-height: 1024px;     background: #000;     overflow: hidden;     position: relative; } .header__video-wrapp  {     position:absolute;     top:0;     left: 0;     right: 0;     bottom: 0;     overflow: hidden;      } .header__video-box {    position: absolute;    top:0;    left: 50%;    height: 100%; } .header__video {     display: inline-block;     height: 100%;     transform: translateX(-50%);     min-height: 768px; } <\/code><\/pre>\n<p>  <a href=\"http:\/\/codepen.io\/Ykodzun\/pen\/wKWRqM\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 codepen<\/a><\/p>\n<p>  \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432\u044b\u0441\u043e\u0442\u0443 <strong>html,body<\/strong> \u0432 100 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u0442\u044c \u043d\u0430\u0448 <strong>header<\/strong> \u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0443 \u044d\u043a\u0440\u0430\u043d\u0430. \u041f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u043d\u0435\u0433\u043e <strong>header__video-wrapp<\/strong> \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u0432 \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430 \u0432\u0435\u0441\u044c \u0431\u043b\u043e\u043a <strong>header<\/strong> \u0438 \u0437\u0430\u0434\u0430\u0432 \u0435\u043c\u0443 <strong>overflow:hidden<\/strong>. \u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a <strong>header__video-box<\/strong> \u0438 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0430\u0448 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <strong>video<\/strong>. \u0410\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0431\u043b\u043e\u043a <strong>header__video-box left:50% top:0<\/strong> \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0431\u043b\u043e\u043a\u0443 <strong>video<\/strong> \u0437\u0430\u0434\u0430\u0435\u043c \u0435\u043c\u0443 <strong>transform: translateX(-50%)<\/strong> \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 50% \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0432\u043e\u0435\u0439 \u0448\u0438\u0440\u0438\u043d\u044b \u0432 \u043b\u0435\u0432\u0430, \u0430 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u0446\u0435\u043d\u0442\u0440\u0430 \u0431\u043b\u043e\u043a\u0430 \u0442\u043e \u0435\u0433\u043e \u0446\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435 \u0431\u043b\u043e\u043a\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u043c \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 100% \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 768px \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0448\u0430\u043f\u043a\u0443 \u043d\u0430 iPade \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0430 \u043d\u0430 iPhone \u0441\u043a\u0440\u043e\u0435\u043c \u043d\u0438\u0436\u043d\u0435\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e. <\/p>\n<p>  \u0415\u0441\u0442\u044c \u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u043d \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443. HTML \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f CSS \u0432 \u0431\u043b\u043e\u043a\u0430\u0445 <strong>header__video-box<\/strong> \u0438 <strong>header__video<\/strong>. <\/p>\n<p>  <b>CSS<\/b><\/p>\n<pre><code class=\"css\">html, body {     margin: 0;     padding: 0;     width: 100%;     height: 100%; } body {     min-height: 100%; } .header {     width:100%;     height: 100%;     max-height: 1024px;     background: #000;     overflow: hidden;     position: relative; } .header__video-wrapp  {     position:absolute;     top:0;     left: 0;     right: 0;     bottom: 0;     overflow: hidden;      } .header__video-box {     text-align: center;     margin: 0 -1000px;     height: 100%; } .header__video {     display: inline-block;     vertical-align: top;     height: 100%;     min-height: 768px; } <\/code><\/pre>\n<p>  <a href=\"http:\/\/codepen.io\/Ykodzun\/pen\/JYKeKE\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 codepen<\/a><\/p>\n<p>  \u0412 \u0431\u043b\u043e\u043a\u0435 <strong>header__video-box<\/strong> \u0437\u0430\u0434\u0430\u0435\u043c \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443 \u0438 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 <strong>margin<\/strong> \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u043c \u0431\u043b\u043e\u043a \u0437\u0430 \u043f\u0440\u0438\u0434\u0435\u043b\u044b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u044b \u043e\u043d \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0438\u0434\u0435\u043e \u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0441\u044f \u043f\u043e \u0446\u0435\u043d\u0442\u0440\u0443. \u0411\u043b\u043e\u043a\u0443 <strong>header__video<\/strong> \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <strong>display: inline-block<\/strong> \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0430\u0442\u0441\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u044b\u0441\u043e\u0442\u0443, \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e.<\/p>\n<p>  \u042f \u043f\u0440\u0438\u0432\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043e\u0432 \u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u044d\u043a\u0440\u0430\u043d\u0430.       <\/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=\"http:\/\/habrahabr.ru\/post\/267519\/\"> http:\/\/habrahabr.ru\/post\/267519\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0432 \u0448\u0430\u043f\u043a\u0443 \u0441\u0430\u0439\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u043e\u043d\u0430. \u0428\u0430\u043f\u043a\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0430 \u0432\u0438\u0434\u0435\u043e \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 <strong>background-position: 50% 0<\/strong>. \u0421\u0443\u0442\u044c \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043d\u0430 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0435 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0438\u0434\u0435\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0435 \u043e\u043d\u043e \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043a\u0440\u0430\u044f\u043c \u0438 \u0441\u043d\u0438\u0437\u0443 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/01c\/b94\/245\/01cb94245bac4ce3a0c07adf3729ebdc.png\"\/>  <\/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-266220","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266220","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=266220"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266220\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}