Html
    Css
    Js

    
                        
.wrap{
    width:300px;
    height:280px;
    margin:0 auto;
}
.block-login {
	width:100%;
	height:280px;
	transform-style:preserve-3d;
        cursor: pointer;
}
.block-page1{
    background:url('http://www.jq22.com/img/cs/500x500-2.png') no-repeat center;
}
.block-page2{
        background:url('http://www.jq22.com/img/cs/500x500-3.png') no-repeat center;
}
.block-zc {
	display:none;
}
/*css3翻转动画*/
.in {
	-webkit-animation-timing-function:ease-out;
	-webkit-animation-duration:350ms;
	animation-timing-function:ease-out;
	animation-duration:350ms;
}
.out {
	-webkit-animation-timing-function:ease-in;
	-webkit-animation-duration:225ms;
	animation-timing-function:ease-in;
	animation-duration:225ms;
}
.flip {
	backface-visibility:hidden;
	-webkit-backface-visibility:hidden;
	-webkit-transform:translateX(0);
	transform:translateX(0);
}
.flip.out {
	-webkit-transform:rotateY(-90deg) scale(.9);
	-webkit-animation-name:flipouttoleft;
	-webkit-animation-duration:175ms;
	transform:rotateY(-90deg) scale(.9);
	animation-name:flipouttoleft;
	animation-duration:175ms;
}
.flip.in {
	-webkit-animation-name:flipintoright;
	-webkit-animation-duration:225ms;
	animation-name:flipintoright;
	animation-duration:225ms;
}
.flip.out.reverse {
	-webkit-transform:rotateY(90deg) scale(.9);
	-webkit-animation-name:flipouttoright;
	transform:rotateY(90deg) scale(.9);
	animation-name:flipouttoright;
}
.flip.in.reverse {
	-webkit-animation-name:flipintoleft;
	animation-name:flipintoleft;
}
@-webkit-keyframes flipouttoleft {
	from {
	-webkit-transform:rotateY(0);
}
to {
	-webkit-transform:rotateY(-90deg) scale(.9);
}
}@keyframes flipouttoleft {
	from {
	transform:rotateY(0);
}
to {
	transform:rotateY(-90deg) scale(.9);
}
}@-webkit-keyframes flipouttoright {
	from {
	-webkit-transform:rotateY(0);
}
to {
	-webkit-transform:rotateY(90deg) scale(.9);
}
}@keyframes flipouttoright {
	from {
	transform:rotateY(0);
}
to {
	transform:rotateY(90deg) scale(.9);
}
}@-webkit-keyframes flipintoleft {
	from {
	-webkit-transform:rotateY(-90deg) scale(.9);
}
to {
	-webkit-transform:rotateY(0);
}
}@keyframes flipintoleft {
	from {
	transform:rotateY(-90deg) scale(.9);
}
to {
	transform:rotateY(0);
}
}@-webkit-keyframes flipintoright {
	from {
	-webkit-transform:rotateY(90deg) scale(.9);
}
to {
	-webkit-transform:rotateY(0);
}
}@keyframes flipintoright {
	from {
	transform:rotateY(90deg) scale(.9);
}
to {
	transform:rotateY(0);
}
}/*css3翻转动画*/
       

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

css3翻转切换

点击图片查看效果

6
      随遇而安0
      2017/6/7 16:13:43

      感觉点击有点多余,hover好点

          Dream0
          2017/6/9 12:00:31

          谢谢,反馈,这个demo开始我是应用在页面登录注册这块的,正面是登录,反面是注册,就随手分享下,如果有需求可以把事件改掉就可以了~~

      回复
      lcjzl0
      2017/5/25 14:04:12

      不错,不过感觉css代码很多

          Dream0
          2017/5/25 14:59:02

          css代码是控制的它的动画,以及变形旋转,感觉好玩就写了个,我看看代码还能不能再精简,谢谢反馈!!!

      回复
      流年之外0
      2017/5/25 11:20:48

      可以的

          Dream0
          2017/5/25 15:01:10

          谢谢反馈!!!

      回复