There are two blocks that are two sides of the same cube. One block is hidden by default. When you press the button, the hidden block replaces the open; it should give the impression that we turned the cube.
Hidden
#hid{width:0px;display:block;position:absolute;-webkit-transform:rotateY(90deg);} Block in a hidden block
#in_hid{width:500px;background-color:#456789;} Open
#ext{width:500;background-color:#987654;} #hid,#ext{-webkit-transition:all 2s;} <div id="cont"> <div id="hid"><div id="in_hid">Текст</div></div> <div id="ext"></div> </div> When you press a button
$(ext).css('transform','translateX(275px) rotateY(90deg)'); $(hid).css('transform','translateX(0px) rotateY(0deg)'); But while rotating, one block climbs onto another and the whole effect spoils? How can you create such an effect without plug-ins?