title: overflow hidden for transform elements
body: <p>I needed to make a mask for the image, the code is like this:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {margin:0;padding:0;}
  .new-header-page-wrapper {
      width:100%;
    height:100vh;
    background: linear-gradient(
  180deg
  , rgb(0 0 0 / 18%) 0%, rgba(0,0,0,0.6166841736694677) 100%),url(https://atmjet.ru/assets/images/main/mainimage.jpg)no-repeat;
      background-position: center;
  }
  .wrap-triangle {
    position:relative;
    /*overflow:hidden;*/
  }
  .main-triangle:after {
    content: "";
    position: absolute;
    width: 51%;
    height: 140px;
    top: -72px;
    left: -1%;
    -webkit-transform: rotate(7deg);
    -moz-transform: rotate(7deg);
    -o-transform: rotate(7deg);
    transform: rotate(7deg);
    background: white;
    background-repeat: no-repeat;
    box-sizing: border-box;
  }
  .main-triangle:before {
    content: "";
    position: absolute;
    width: 51%;
    height: 140px;
    top: -72px;
    right: -1%;
    -webkit-transform: rotate(-7deg);
    -moz-transform: rotate(-7deg);
    -o-transform: rotate(-7deg);
    transform: rotate(-7deg);
    background: white;
    background-repeat: no-repeat;
    box-sizing: border-box;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
  &lt;div class="new-header-page-wrapper"&gt;
  &lt;/div&gt;
  &lt;div class="wrap-triangle"&gt;
      &lt;div class="main-triangle"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>But there was a horizontal scrolling, at the same time overflow:hidden removes the visibility of blocks :after,:before
  How to remove horizontal scrolling?</p>