title: How to smoothly hide part of an element
body: <p>I've a row of elements with some values in a container and its width is limited (eg 500px), but all of the elements takes more (eg 800px)</p>
  <p>Using <code>overflow-x: hidden</code> it looks like: <a href="https://jsfiddle.net/IPShow/tzua3dj0/7/" rel="nofollow noreferrer">DEMO</a></p>
  <p><div class="snippet" data-lang="js" data-hide="true" data-console="true" data-babel="false">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>section {
    display: flex;
  }
  
  #container {
    max-width: 500px;
    height: 30px;
    overflow-x: hidden;
  }
  
  #container&gt;* {
    border: solid 1px black;
    padding: 2px;
    margin-right: 4px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;section id="container"&gt;
    &lt;section&gt;2.43&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.17&lt;/section&gt;
    &lt;section&gt;2.17&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.44&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.34&lt;/section&gt;
    &lt;section&gt;2.35&lt;/section&gt;
    &lt;section&gt;2.15&lt;/section&gt;
    &lt;section&gt;3.10&lt;/section&gt;
    &lt;section&gt;3.10&lt;/section&gt;
    &lt;section&gt;3.10&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.14&lt;/section&gt;
    &lt;section&gt;2.34&lt;/section&gt;
    &lt;section&gt;2.35&lt;/section&gt;
    &lt;section&gt;2.15&lt;/section&gt;
    &lt;section&gt;3.16&lt;/section&gt;
    &lt;section&gt;1.10&lt;/section&gt;
    &lt;section&gt;4.10&lt;/section&gt;
  &lt;/section&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>But I want to see that (made in photoshop):</p>
  <p><a href="https://i.stack.imgur.com/jR2zB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jR2zB.png" alt="enter image description here" /></a></p>
  <p>Is there a way to implement this smooth disappear without using <code>box-shadow</code>, because I'm going to crate a dynamic background?</p>