title: Infinite moving text with scrolling
body: <p>I want make a moving infinite text like this text(We are trusted by over 28,000...) in this <a href="http://preview.themeforest.net/item/ernest-creative-portfolio-template/full_screen_preview/35613977?_ga=2.235917953.1410740607.1642603474-1415504948.1642603474" rel="nofollow noreferrer">link</a> . I already tried something but I have not reached exactly what I want. It is close but not infinite.</p>
  <pre><code>&lt;h1 class=&quot;deneme display-1 &quot; id=&quot;movingtext&quot;&gt;We are trusted by over 28,000 clients to power stunning websites.We are trusted by over 28,000 clients to power stunning websites.&lt;/h1&gt;
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>window.addEventListener('scroll', () =&gt; {
    var elemen = document.getElementById(&quot;movingtext&quot;);
    elemen.style = &quot;left:-450px&quot;
    var rect = elemen.getBoundingClientRect();
    var rect1 = rect.left;
    var scrolled = window.scrollY;
    var deg = (rect1 + scrolled) / 1.8;
  
    elemen.style = &quot;left:&quot; + deg + &quot;px&quot;;
    console.log(rect.left, rect.right);
  })
  </code></pre>