I wanted to add this animation to the vehicles and clouds in the first and second sections to bring out the feeling of a city that is alive, and not using static imagery.
How It Works
The first step was to add a class to the HTML elements that I wanted to animate, for this one I wanted to animate a car move from left to right on the screen. On the parallax.js list item I added an ID – object4.
Within the CSS I selected my ID tag and then move it to -100% left this means that the vehicle is now out of the screen canvas (out of the view port).
After the animation function has been implemented with the correct information entered in, you can then edit the speed of each individual animation depending on the ID selected, so you can have one moving faster than the other.
Here is The Animation Working:
Why I Didn’t Use After Effects