I try to always fold the front / back panel in the same direction. I implemented a flip using css and javascript, but itβs not easy for me to think about how to make it always rotate to the right, not rotate to the right, and then return to the left.
I mainly use div with css
/* flip speed goes here */ .flipper { -webkit-transition: 0.6s; -webkit-transform-style: preserve-3d; -moz-transition: 0.6s; -moz-transform-style: preserve-3d; -o-transition: 0.6s; -o-transform-style: preserve-3d; transition: 0.6s; transform-style: preserve-3d; position: relative; border-radius: 5px; -webkit-border-radius: 5px; padding: 5px; margin-left: 3px; z-index: 3; width: 160px; height: 145px; display:block; }
and when the user clicks on it, I add the "flipped" class to the div, which changes css to this:
/* flip the pane when hovered */ .flip-container.flipped .flipper { -webkit-transform: rotateY(180deg); -moz-transform: rotateY(180deg); -o-transform: rotateY(180deg); transform: rotateY(180deg); }
Do you just need to increase the angle of rotation? any other ideas?
Here is the current status and full css in fiddle
javascript css3 css-transitions
tmaximini
source share