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)...