A simple example is the T-Rex chrome browser game.
Where the character runs without leaving its position and the background gradually increases its speed. I have done with the background speed but do not know how to keep the character in the same position yet go with the background (opposite to the platform)...
Develop games in your browser. Powerful, performant & highly capable.
i am a noob but i think, scroll to a sprite but i dont know the details ,maybe look that up