title: Marquee div in flex
body: <p>I'm trying to create an infinite horizontal "scroll" like a marquee effect (<a href="http://jsfiddle.net/1mjfwvu8/2/" rel="noreferrer">like this one</a>, for example).</p>
  
  <p>This is my code:</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>.parent {
    border: 1px solid black;
    width: 100%;
    height: 2rem;
  }
  
  .container {
    height: 100%;
    display: flex;
    padding-left: 10%;
    border: 1px solid tomato;
    animation: marquee 5s linear infinite;
  }
  
  @keyframes marquee {
    0% {
      transform: translate(0%, 0);
    }
    100% {
      transform: translate(-100%, 0);
    }
  }
  
  .child1 {
    width: 10rem;
    height: 100%;
    background-color: #84B7DF;
  }
  .child2 {
    width: 18rem;
    height: 100%;
    background-color: #f58db6;
  }
  .child3 {
    width: 13rem;
    height: 100%;
    background-color: #ffc410;
  }
  .child4 {
    width: 21rem;
    height: 100%;
    background-color: #C8E7C1;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="parent"&gt;
    &lt;div class="container"&gt;
      &lt;div class="child1"&gt;&lt;/div&gt;
      &lt;div class="child2"&gt;&lt;/div&gt;
      &lt;div class="child3"&gt;&lt;/div&gt;
      &lt;div class="child4"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>As you can see, it works but not perfectly.
  I would like that as soon as the green rectangle has shifted, the blue (slightly spaced) one immediately appears, I don't want there to ever be a whole white screen.</p>
  
  <p>I hope is clear what I mean...</p>
  
  <p>Thanks a lot!</p>