Demo Page

CSS3 Transitions Using :focus

Using the mouse or keyboard, place your cursor into any of the form fields.

No JavaScript. This uses the CSS :focus pseudo-class to transition (or animate) the width of the form fields.