I have been puzzling over a piece of code since yesterday, and finally
saw what the issue was. The original is from a book by a group of (Russian) coders,
and it moves a little train along with speed defined in terms of a cubic Bézier.
In my mania for code by the book, I couldn't get my little car to move
along like the original. Remember, in CSS one would specify
margin-left, while
in JavaScript,
marginLeft. What makes the car move smoothly is using the
moniker 'left' in both cases.!!??
The html file:
The style.css file:
Bezier values one can try:
No comments:
Post a Comment