How The Hell Did They Do That!

when you click between the categories the main box flips, rotates and desolves.
how did they do it? :look: