<i>Would I have done this in HTML and Javascript? No.</i><p>A couple of lines in jQuery. Would work on iPhone too.
CSS transitions and animation is a nice way to create simple (and not so simple animation). Work on iPhone too. Hardware accelerated.