Yes, this works fine in browsers that support canvas, and also works the same in IE6 and IE7 using the exCanvas project, which translates canvas commands into the Microsoft XML, VML vector language.
One thing I noticed when trying to overlay canvas elements in all browsers is that you should be especially careful with the order in which you add and subsequently access any child DOM nodes of the canvas. IE needs to add the item you need to add before you can work with it.
Gavin source share