左/ライトではなく上/下にフリップしたいので、質問は軸または角度を変更する必要がありますか? 2時間で何もうまくいかないようです。これを案内してください。これがフィドルです。
HTML
<div class="flip" style="width: X.px; height: X.px;">
<a href="#">
<div class="flip-front">
<img src="http://divabetic.files.wordpress.com/2012/07/dai-mcdonalds-400-calories280.jpg">
</div>
<div class="flip-back">
<img src="http://divabetic.files.wordpress.com/2012/07/dai-mcdonalds-400-calories280.jpg">
</div>
</a>
</div>
CSS
.flip {
position: relative;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-ms-perspective: 1000;
-o-perspective: 1000;
perspective: 1000;
}
.flip .flip-front, .flip .flip-back {
position: absolute;
top: 0;
left: 0;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: 0.75s;
-moz-transition: 0.75s;
-o-transition: 0.75s;
transition: 0.75s;
}
.flip .flip-front {
z-index: 5;
}
.flip .flip-back {
z-index: 0;
-webkit-transform: rotateY(-180deg);
-moz-transform: rotateY(-180deg);
-ms-transform: rotateY(-180deg);
-o-transform: rotateY(-180deg);
transform: rotateY(-180deg);
}
.flip:hover .flip-front {
z-index: 5;
-webkit-transform: rotateY(270deg);
-moz-transform: rotateY(270deg);
-ms-transform: rotateY(270deg);
-o-transform: rotateY(270deg);
transform: rotateY(270deg);
}
.flip:hover .flip-back {
z-index: 5;
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg);
}