I’m using TransformJS to rotate a div onclick. The div rotates 180 degress about its y-axis, thus flipping it over against the window.
My question is this- is there anyway to show separate background-color and text on the back of the element once you flip it? Here is a link to a quick jsfiddle i made to test:
http://jsfiddle.net/kSR9H/1/
As you can see from the fiddle, even if you flip the element, the background is still red, and I can’t figure out how to place text on the back.
You can split the flip in two parts and after the first, toggle a class that sets a new background..
Demo at http://jsfiddle.net/gaby/kSR9H/2/
(Math.PI) / 2in each animation (added the /2)