This page shows some animations in HTML5 canvas. If you look at the source of the scroller, there\'s a statement to save the context after clearing the rectangle and restoring i
The context save() saves stuff like transformation color among other stuff. Then you can change the context and restore it to have the same as when you saved it. It works like a stack so you can push multiple canvas states onto the stack and recover them. http://html5.litten.com/understanding-save-and-restore-for-the-canvas-context/