Idle to have nothing to do, play CSS3, hehe ...
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>3D interaction</title> <Linkrel= "stylesheet"type= "Text/css"href= "http://css.40017.cn/cn/min/??/cn/c/zt/2013/ztBase.css?v=13080902"> <Linkrel= "stylesheet"href= "1.css"></Head><Body> <!--background - <Divclass= "box"> <Divclass= "Box_wrapper"> <Divclass= "Cube"> <Divclass= "Fornt"> <H2>Fornt</H2> </Div> <Divclass= "Back"> <H2>Back</H2> </Div> <Divclass= "Top"> <H2>Top</H2> </Div> <Divclass= "Bottom"> <H2>Bottom</H2> </Div> <Divclass= "Left"> <H2>Left</H2> </Div> <Divclass= "Right"> <H2>Right</H2> </Div> </Div> </Div> </Div></Body></HTML>
. Box_wrapper{Margin-top:300px;Perspective:1000px;Perspective-origin:50% 50%;}. Cube{margin:Auto;Height:200px;width:200px;position:relative;Transform-style:preserve-3d;}. Cube Div{position:Absolute;padding:10px;width:100%;Height:100%;box-sizing:Border-box;Border:Solid 1px #eee;Color:#fff;Font:10px Arial;Opacity:0.6;transition:Transform 0.2s ease-in;}. Fornt{background:Green;Transform:Translatez (100px);}. Back{background:Green;Transform:Translatez ( -100px) Rotatey (180deg);}. Right{background:#000;Transform:Rotatey ( -270deg) TranslateX (100px);Transform-origin:Top Right;}. Left{background:#000;Transform:Rotatey (270deg) TranslateX ( -100px);Transform-origin:Center Left;}. Top{background:Red;Transform:Rotatex ( -270deg) Translatey ( -100px);Transform-origin:Top Center;}. Bottom{background:Red;Transform:Rotatex (270deg) Translatey (100px);Transform-origin:Bottom Center;}@keyframes Rotate{From {transform:Rotatex (0deg) Rotatey (0deg); } to{Transform:Rotatex (360deg) Rotatey (360deg); }}.cube{Animation:rotate 20s Infinite linear;}. Box_wrapper:hover. fornt{Transform:Translatez (200px);}. Box_wrapper:hover. back{Transform:Translatez ( -200px) Rotatey (180deg);}. Box_wrapper:hover. Right{Transform:Rotatey ( -270deg) Translatez (100px) TranslateX (100px);}. Box_wrapper:hover. Left{background:#000;Transform:Rotatey (270deg) Translatez (100px) TranslateX ( -100px);}. Box_wrapper:hover. Top{Transform:Rotatex ( -270deg) Translatez (100px) Translatey ( -100px);}. Box_wrapper:hover. Bottom{Transform:Rotatex (270deg) Translatez (100px) Translatey (100px);}
Results under:
When the mouse hover, the following:
3D Animation Practice