Sorry if I misphrase anything, not sure how to phrase the need I'm having.
Say I have a paragraph inside a div:
<div style="width: 50px">
<p>Hi</p>
</div>
- I want to move the paragraph (which covers 0-2px), up until the 50px.
- When it reaches 49/50, 1 letter will be gone.
- When it reaches 50/50, all 2 letters be gone, and the same behavior will start again, from scratch...
To clarify: I mean to create these "old school" moving text bars, in which a text starts in the right edge of the bar, and moves pixel after pixel, in some speed, to the left edge, disappears, and again the same pattern.
I didn't find any code for "moving a text" (surly not in ES6) [1], [2]. Most of what I found is in Jquery, like this article, but I desire an ES6 vanilla solution.