Se fatto in CSS3 è abbastanza semplice:

http://jsfiddle.net/andsens/d7vKd/