{"id":287254,"date":"2018-08-16T13:33:39","date_gmt":"2018-08-16T09:33:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=287254"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=287254","title":{"rendered":"5 \u043f\u0440\u0438\u0435\u043c\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 CSS, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u043d\u0430\u0442\u044c"},"content":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/420307\/\" class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/su\/rx\/og\/surxogofo3xvpjpruhkf3_0ga1y.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e CSS \u043d\u0430 \u0422\u043e\u0441\u0442\u0435\u0440\u0435 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e-\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u0414\u0430, \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0433\u043b\u0443\u043f\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a \u0438 \u0442\u044f\u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c RTFM! \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043d\u044f\u0442\u043d\u044b\u0435. \u041e\u043d\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0442\u043a\u043e\u0439. \u041d\u0435 \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0433\u043b\u0430\u0437\u0430 \u043d\u0430 \u043b\u043e\u0431 \u043b\u0435\u0437\u043b\u0438, \u043d\u043e \u0438 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f\u0430 \u0438 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432. \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u0442\u044c \u2014 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u044f \u0441\u0443\u0442\u044c \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u043d\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0430\u0434\u043e\u0435\u0434\u0430\u0435\u0442. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b, \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0430\u043c, \u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442, \u0447\u0435\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"1-tuda-syuda-obratno\">1. \u0422\u0443\u0434\u0430-\u0441\u044e\u0434\u0430-\u043e\u0431\u0440\u0430\u0442\u043d\u043e<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vj\/ww\/uv\/vjwwuvlnaueetf0tujhx09i9fts.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e. \u0415\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442-\u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u042d\u0442\u043e \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u0441\u044b\u0445 \u0441\u0435\u043a\u0446\u0438\u0439. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;div class='custom-section'&gt;     &lt;div class='block -left'&gt;         &lt;img class='background' src='...' \/&gt;         &lt;a class='link' href=''&gt;Summer&lt;\/a&gt;     &lt;\/div&gt;     &lt;div class='block -right'&gt;         &lt;img class='background' src='...' \/&gt;         &lt;a class='link' href=''&gt;Winter&lt;\/a&gt;     &lt;\/div&gt; &lt;\/div&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0438\u0447\u0435\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e. \u0418\u0437 \u043d\u0435\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/bjyLrj?height=300&amp;slug-hash=bjyLrj&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e? \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 <code>transform: skew(-15deg)<\/code> \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 \u0438 <code>transform: skew(15deg)<\/code> \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u2014 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u0441\u0441\u044b\u043b\u043e\u043a. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u043e\u0442 \u0438 \u0432\u0441\u0435. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043e\u0442\u043c\u0435\u043d\u0438\u043b\u0438 \u0435\u0435 \u0434\u043b\u044f \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code>.custom-section {     &gt; .block.-left {         transform: skew(-15deg) translate(-15%);     }      &gt; .block.-left &gt; .background {         transform: skew(15deg) translateX(15%);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>transform: skew<\/code> \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0435\u0433\u043e \u043f\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>transform: translate<\/code>.<\/p>\n<p>  <\/p>\n<blockquote><p>\u0412 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0435\u0433\u0430 <code>img<\/code>. \u0411\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043f\u0440\u043e <code>object-fit: cover<\/code>.<\/p><\/blockquote>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0438 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>rotate<\/code> \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0438\u0444\u0435\u0440\u0431\u043b\u0430\u0442 \u0438\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u043e \u043a\u0440\u0443\u0433\u0443:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qe\/p3\/ic\/qep3ic1unoti3jse09hz9rijehi.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u043e\u0442 \u0436\u0435. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043e\u0442\u043c\u0435\u043d\u0438\u043b\u0438 \u0435\u0435 \u0434\u043b\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code>.image-wrapper {     &amp;:nth-of-type(2) {         transform: rotate(45deg);         .image { transform: rotate(-45deg); }     }      &amp;:nth-of-type(3) {         transform: rotate(90deg);         .image { transform: rotate(-90deg); }     }      \u0438.\u0442.\u0434. }<\/code><\/pre>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/EpzQbV?height=300&amp;slug-hash=EpzQbV&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h2 id=\"2-bordienty\">2. \u0411\u043e\u0440\u0434\u0438\u0435\u043d\u0442\u044b<\/h2>\n<p>  <\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0432 CSS \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u0433\u0440\u0430\u043d\u0438\u0446 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0430 \u0432\u0441\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0439 \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0430\u0435\u0442 \u0432 \u0441\u0442\u0443\u043f\u043e\u0440 <s>\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u0430\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0443 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043e\u0439 \u043f\u043e \u0433\u043e\u043b\u043e\u0432\u0435<\/s>. \u041d\u0430 \u0422\u043e\u0441\u0442\u0435\u0440\u0435 \u0447\u0430\u0441\u0442\u043e \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0431\u043e\u0440\u0434\u0435\u0440\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u043b\u043a\u0438, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u043e\u0439\/\u0442\u0440\u043e\u0439\u043d\u043e\u0439 \u0431\u043e\u0440\u0434\u0435\u0440 \u0438.\u0442.\u0434. \u0412\u0441\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1u\/1t\/hj\/1u1thjmmsvk8twdysomzd7ykery.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u043f\u0440\u043e\u0441\u0442\u0430 \u0434\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438: \u0432\u0437\u044f\u0442\u044c \u043b\u0438\u043d\u0435\u0439\u043d\u044b\u0435 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u044b \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0438\u0445 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0431\u043e\u0440\u0434\u0435\u0440, \u043a\u0430\u043a\u043e\u0439 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c. \u0412 \u043d\u0430\u0448\u0435\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u0441\u0442\u0435\u0440\u0435\u043e\u0442\u0438\u043f\u043e\u0432 \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u043b\u044e\u0434\u044f\u043c \u0432\u0438\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443, \u0447\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b (\u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 CSS) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u0436\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/pZmadB?height=300&amp;slug-hash=pZmadB&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0434\u0432\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432: \u0432 <code>border-image<\/code> \u0438 <code>background-image<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u0435\u043d \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <code>border-image-slice<\/code>, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0435\u043d \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0433\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/p>\n<p>  <\/p>\n<pre><code>.example {     &amp;:nth-of-type(1) {         border-size: 3px;         border-style: solid;         border-image: linear-gradient(to bottom, #86CB92 0%, transparent 40%, transparent 60%, #86CB92 100%);         border-image-slice: 1;     }      &amp;:nth-of-type(3) {         background: linear-gradient(to right, #86CB92 0%, transparent 100%),             linear-gradient(to right, transparent 0%, #86CB92 100%),             linear-gradient(to bottom, #86CB92 0%, transparent 100%),             linear-gradient(to bottom, transparent 0%, #86CB92 100%),             linear-gradient(to right, #86CB92 0%, #86CB92 100%),             linear-gradient(to right, #86CB92 0%, #86CB92 100%);         background-size: 70% 3px, 70% 3px, 3px 70%, 3px 70%, 20% 20%, 20% 20%;         background-position: 50% 0, 50% 100%, 0 50%, 100% 50%, 5% 5%, 95% 95%;         background-repeat: no-repeat;     } }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 Safari \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0441 <code>border-width<\/code> \u0438 <code>border-style<\/code>, \u043a\u0430\u043a \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439 <code>border: 3px solid transparent<\/code>.<\/p><\/blockquote>\n<p>  <\/p>\n<h2 id=\"3-chastichnoe-dublirovanie-stiley\">3. \u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0438\u043b\u0435\u0439<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/di\/nh\/cf\/dinhcfwzngkob_pbfcbr--bofo8.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0418 \u0440\u0430\u0437 \u0443\u0436 \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0431\u043e\u0440\u0434\u0435\u0440\u0430\u0445, \u0441\u043a\u0430\u0436\u0435\u043c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438. \u0422\u043e\u0436\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043f\u0440\u0438\u0435\u043c. \u0415\u0441\u043b\u0438 \u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u0431\u043e\u0440\u0434\u0435\u0440, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u0437\u044f\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (<code>::before<\/code> \u0438\u043b\u0438 <code>::after<\/code>), \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0432\u0435\u0440\u0445\u0443, \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 <code>100% \/ 100%<\/code> \u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u0440\u0434\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<p>  <\/p>\n<pre><code>.overflow-example {     border: solid 5px #fff;     position: relative;      &amp;::after {         display: block;         content: '';         position: absolute;         top: 0;         left: 0;         height: 100%;         width: 100%;         border-bottom: solid 5px #fff;     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c &#171;\u0432\u044b\u043b\u0435\u0437\u0430\u043d\u0438\u0435&#187; \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/RBmQxL?height=300&amp;slug-hash=RBmQxL&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0447\u0430\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445, \u0442\u0430\u043a \u0447\u0442\u043e \u0435\u0433\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u044f\u0442\u044c \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<blockquote><p>\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c <code>pointer-events: none<\/code> \u0432\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.<\/p><\/blockquote>\n<p>  <\/p>\n<h2 id=\"4-kontent-vyrvannyy-iz-konteksta\">4. \u041a\u043e\u043d\u0442\u0435\u043d\u0442, \u0432\u044b\u0440\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u0412\u044b\u043b\u0435\u0437\u0430\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043d\u0430\u0441 \u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u0448\u0442\u0443\u043a\u043e\u0432\u0438\u043d\u0435 \u2014 \u0432\u044b\u0440\u044b\u0432\u0430\u043d\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u041f\u0440\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>z-index<\/code> \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a, \u043d\u043e \u043c\u0430\u043b\u043e \u043a\u0442\u043e \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e \u043d\u0435\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0445 \u0431\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434\u0430\u0445 \u0438\u0437 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0438\u0437\u043b\u0438\u0448\u043d\u0435\u043c\u0443 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0438\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440. \u041d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442 \u0444\u043e\u043d\u0430\u0440\u0438\u043a\u0430 (\u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u043e\u043d\u0430 \u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0434\u0438\u0443\u0441\u0435 \u043e\u0442 \u043a\u0443\u0440\u0441\u043e\u0440\u0430). \u041a\u0430\u043a \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443?<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k0\/xj\/j5\/k0xjj5nlprkldfo_wwzpa6rn4lc.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;div class='custom-grid'&gt;     &lt;div class='item'&gt;         &lt;div class='text'&gt;Lorem ipsum dolor sit amet&lt;\/div&gt;     &lt;\/div&gt;     &lt;div class='item'&gt;         &lt;div class='text'&gt;Lorem ipsum dolor sit amet&lt;\/div&gt;     &lt;\/div&gt;     \u0438.\u0442.\u0434.<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u043a\u0430\u043a-\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u043f\u0440\u044f\u043c\u043e \u0441\u044e\u0434\u0430? \u0414\u0430. \u041f\u0440\u0438\u0447\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043b\u0430\u0434\u0435\u043c \u0441\u0432\u0435\u0440\u0445\u0443 \u043d\u0430 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0434\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0441 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u0434\u044b\u0440\u043a\u043e\u0439 \u0432 \u0446\u0435\u043d\u0442\u0440\u0435<\/li>\n<li>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>z-index<\/code> \u0432\u044b\u0440\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u043e\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0435\u0440\u0445 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 \u0440\u0430\u0434\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code>.shadow {     position: absolute;     left: 50%;     top: 50%;     height: 200vh;     width: 200vw;     transform: translateX(-50%) translateY(-50%);     background: radial-gradient(circle at center, transparent 0%, transparent 5%, #302015 70%, #302015 100%); }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u0445, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u043a \u043c\u044b\u0448\u043a\u0435 \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0432 200vh\/200vw \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043a\u0440\u0430\u044f \u043d\u0435 \u0432\u044b\u043b\u0435\u0437\u0430\u043b\u0438 \u0432 \u0432\u0438\u0434\u0438\u043c\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c.<\/p><\/blockquote>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/ajrqqd?height=300&amp;slug-hash=ajrqqd&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0431\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434. \u0421\u043d\u0438\u0437\u0443 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0431\u043e\u0440\u0434\u0435\u0440\u044b, \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u043b\u0435\u0433 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442, \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u0441\u0435 \u043d\u0430\u043a\u0440\u044b\u043b\u043e\u0441\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c. \u0414\u0430\u0436\u0435 \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0442\u0430\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0438 \u043f\u0430\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a CSS. \u0411\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u0432\u0441\u0435 \u0436\u0435. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0436\u0438\u0432\u0438\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0432 \u0435\u0433\u043e \u043a \u043c\u044b\u0448\u043a\u0435:<\/p>\n<p>  <\/p>\n<pre><code>const grid   = document.getElementById('js-grid'); const shadow = grid.querySelector('.shadow');  document.addEventListener('mousemove', (e) =&gt; {     const rect = grid.getBoundingClientRect();      window.requestAnimationFrame(() =&gt; {         shadow.style.left = `${e.clientX - rect.left}px`;         shadow.style.top = `${e.clientY - rect.top}px`;     }); });<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0438 \u0441 \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u043a\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u043c\u0435\u043d\u044e, \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044f \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439 \u0442\u0435\u043d\u044c\u044e.<\/p>\n<p>  <\/p>\n<h2 id=\"5-buterbrod-iz-svg-i-html\">5. \u0411\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434 \u0438\u0437 SVG \u0438 HTML<\/h2>\n<p>  <\/p>\n<p>\u0411\u0443\u0442\u0435\u0440\u0431\u0440\u043e\u0434\u044b. \u0425\u043c\u043c\u2026 \u0415\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d. \u041e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439. \u0420\u0435\u0448\u0430\u0435\u0442 \u043e\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443: \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u0445\u0435\u043c\u0430, \u043a\u0430\u0440\u0442\u0430, \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u043b\u0438 \u0435\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u0432 \u0432\u0438\u0434\u0435 SVG \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443, \u0442\u043e \u043f\u0440\u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c\u0441\u044f \u0438\u043b\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u044b \u043d\u0430 \u043d\u0435\u0439. \u042d\u0442\u043e \u043c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0438\u0445 &#171;\u0440\u0430\u0437\u043c\u044b\u043b\u0438\u0432\u0430\u043d\u0438\u044e&#187; \u0438 \u0438\u0441\u043a\u0430\u0436\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0439, \u043d\u043e \u0438 \u0432\u044b\u0431\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438\u043b\u0438 \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ml\/fq\/ve\/mlfqvelbsfsciwbyjfauoah4zie.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0430\u0441\u0442\u044c \u043f\u043e\u0432\u0435\u0440\u0445 SVG \u043e\u0431\u044b\u0447\u043d\u044b\u0439 <code>div<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0435\u0440\u0441\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code>.mixed-graph {     &gt; .svg {         ....     }      &gt; .dots {         position: absolute;         z-index: 1;     } }<\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0423\u0434\u043e\u0431\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u0434\u0435\u043b\u0430\u0442\u044c <code>viewbox='0 0 100 100'<\/code> \u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u043b\u043e\u0435 HTML \u0441\u043e\u0432\u043f\u0430\u043b\u0438 \u0441 \u043d\u0438\u043c\u0438 \u0436\u0435 \u0432 \u0441\u043b\u043e\u0435 SVG.<\/p><\/blockquote>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0441\u0435 \u043d\u0430\u0434\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435, \u043a\u0430\u043a \u0438 \u043d\u0430 \u0432\u0441\u0435\u0439 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u0412 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 <a href=\"https:\/\/www.smashingmagazine.com\/2016\/05\/fluid-typography\/\">\u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e\u0439 \u0442\u0438\u043f\u043e\u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0439<\/a> \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0435 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 300px; position: relative;\"><iframe src=\"https:\/\/codepen.io\/sfi0zy\/embed\/preview\/vawdje?height=300&amp;slug-hash=vawdje&amp;default-tabs=css,result&amp;host=https:\/\/codepen.io&amp;embed-version=2\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  <\/p>\n<hr>\n<p>  <\/p>\n<h2 id=\"vmesto-zaklyucheniya\">\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0438, \u0438\u0437\u0443\u0447\u0430\u0439\u0442\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>\u0432\u0441\u0435<\/em> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u0432\u0430\u0448\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b. \u041c\u0438\u0440 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u044f\u0436\u0435\u043b\u044b\u0435 \u043f\u043b\u0430\u0433\u0438\u043d\u044b \u0434\u043b\u044f jQuery \u0441\u0435\u0439\u0447\u0430\u0441 \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u0439 \u0441\u0442\u0440\u043e\u043a CSS, \u0434\u0430 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u043d\u0435 \u0438\u0434\u0443\u0442 \u043d\u0438 \u0432 \u043a\u0430\u043a\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 2000\u0445. \u041f\u043e\u0440\u0430 \u0443\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u043c\u0438\u0440\u0430 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e &#171;\u0432\u0435\u0440\u0441\u0442\u043a\u0430&#187; \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0443\u0436\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0431\u0435\u0437 \u043e\u0433\u043b\u044f\u0434\u043a\u0438 \u043d\u0430 \u0431\u044b\u043b\u044b\u0435 \u0441\u0442\u0435\u0440\u0435\u043e\u0442\u0438\u043f\u044b \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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:\/\/habr.com\/post\/420307\/\"> https:\/\/habr.com\/post\/420307\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div data-io-article-url=\"https:\/\/habr.com\/post\/420307\/\" class=\"post__text post__text-html js-mediator-article\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/su\/rx\/og\/surxogofo3xvpjpruhkf3_0ga1y.jpeg\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0431\u043b\u044e\u0434\u0430\u044f \u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e CSS \u043d\u0430 \u0422\u043e\u0441\u0442\u0435\u0440\u0435 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u043e-\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u0414\u0430, \u0435\u0441\u0442\u044c \u0441\u043e\u0432\u0441\u0435\u043c \u0433\u043b\u0443\u043f\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a \u0438 \u0442\u044f\u043d\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c RTFM! \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043d\u044f\u0442\u043d\u044b\u0435. \u041e\u043d\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0442\u043a\u043e\u0439. \u041d\u0435 \u0442\u0430\u043a\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0433\u043b\u0430\u0437\u0430 \u043d\u0430 \u043b\u043e\u0431 \u043b\u0435\u0437\u043b\u0438, \u043d\u043e \u0438 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0431\u0443\u0442\u0441\u0442\u0440\u0430\u043f\u0430 \u0438 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u043e\u0432 \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432. \u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0443\u0433\u043b\u0438\u0442\u044c \u2014 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u044f \u0441\u0443\u0442\u044c \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435, \u043d\u043e \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0430\u0434\u043e\u0435\u0434\u0430\u0435\u0442. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0435\u043c\u044b, \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u043a\u0440\u0443\u0433 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432. \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u043c \u0432\u0435\u0440\u0441\u0442\u0430\u043b\u044c\u0449\u0438\u043a\u0430\u043c, \u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442, \u0447\u0435\u043c \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f.<\/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-287254","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287254","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=287254"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/287254\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}