CSS3 rotate animation causes Animate.css shake animation to disappear - css

Whenever I execute an Animate.css shake animation after a CSS3 rotate animation the div being shook will disappear. This only happens on the back-face of the rotated divs. The front-face doesn't have this issue.
I've put together a jsfiddle to demonstrate the problem.
http://jsfiddle.net/kG9Ld/1/
HTML
<div class="wrappers">
<div class="wrapper shaker front">
<p>Front</p>
<p>Flip</p>
<p>Shake</p>
</div>
<div class="wrapper shaker back">
<p>Back</p>
<p>Flip</p>
<p>Shake</p>
</div>
</div>
CSS
.wrappers {
-webkit-transition:-webkit-transform 1s;
-moz-transition:-moz-transform 1s;
-ms-transition:-ms-transform 1s;
-o-transition:-o-transform 1s;
transition: transform 1s;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.wrapper {
height: 100px;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
position: absolute;
width: 100px;
}
.front {
background-color: red;
z-index: 3;
}
.back {
background-color: green;
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
transform: rotateY(180deg);
z-index: 1;
}
.flipped {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
transform: rotateY(180deg);
}
.flipped .back {
z-index: 3;
}
JavaScript
$('.flip').on('click', function (e) {
$wrappers = $('.wrappers');
$wrappers.toggleClass('flipped');
});
$('.shake').on('click', function (e) {
$('.shaker').addClass('animated shake');
});
$('.shaker').on('webkitAnimationEnd mozAnimationEnd oAnimationEnd animationEnd', function(e) {
$('.shaker').removeClass('animated shake');
});

The problem was that the shaking animation's transform property was overwriting the .back element's transform property: rotateY(180deg).
The solution would just be to modify the animation and use a combination of transformations:
WORKING EXAMPLE HERE
-webkit-transform: translateX(0) rotateY(180deg);
This would of course require new keyframes:
#-webkit-keyframes shakeBack {
0%, 100% {
-webkit-transform: translateX(0) rotateY(180deg);
transform: translateX(0) rotateY(180deg);
}
10%, 30%, 50%, 70%, 90% {
-webkit-transform: translateX(-10px) rotateY(180deg);
transform: translateX(-10px) rotateY(180deg);
}
20%, 40%, 60%, 80% {
-webkit-transform: translateX(10px) rotateY(180deg);
transform: translateX(10px) rotateY(180deg);
}
}
You now need to add a different animation based on whether the front/back of the element is visible.
.shakeBack {
-webkit-animation-name: shakeBack;
animation-name: shakeBack;
}
Modified JS - this could be written better, but you get the point.
$('.shaker.front .shake').on('click', function (e) {
$(this).parents('.shaker').addClass('animated shake');
});
$('.shaker.back .shake').on('click', function (e) {
$(this).parents('.shaker').addClass('animated shakeBack');
});

Related

Problems with CSS Flip animation in Firefox

I try to use the CSS flip animation example of David Walsh on my website. Code in my snippet doesn't work well with the Firefox.
How to fix this code without using of javascript magic? Why it happens with the latest Firefox versions?
#flip_blocks_main {
position:relative;
width: 100%;
text-align: center;
}
.flip-container {
margin-left:15px;
margin-right:20px;
margin-bottom:30px;
display: inline-block;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-o-perspective: 1000;
-ms-perspective: 1000;
perspective: 1000;
-ms-transform: perspective(1000px);
-moz-transform: perspective(1000px);
-o-transform: perspective(1000px);
-webkit-transform: perspective(1000px);
transform: perspective(1000px);
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
/* START: Accommodating for IE */
.flip-container:hover .back, .flip-container.hover .back {
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
}
.flip-container:hover .front, .flip-container.hover .front {
-webkit-transform: rotateX(-180deg);
-moz-transform: rotateX(-180deg);
-o-transform: rotateX(-180deg);
-ms-transform: rotateX(-180deg);
transform: rotateX(-180deg);
}
/* END: Accommodating for IE */
.flip-container, .front, .back {
width: 300px;
height: 230px;
}
.flipper {
-webkit-transition: 0.6s;
-webkit-transform-style: preserve-3d;
-ms-transition: 0.6s;
-moz-transition: 0.6s;
-moz-transform: perspective(1000px);
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transition: 1s;
transform-style: preserve-3d;
position: relative;
}
.front, .back {
border: 4px solid black;
border-radius: 10px;
padding: 10px;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: 1s;
-webkit-transform-style: preserve-3d;
-webkit-transform: rotateX(180deg);
-moz-transition: 1s;
-moz-transform-style: preserve-3d;
-moz-transform: rotateX(180deg);
-o-transition: 1s;
-o-transform-style: preserve-3d;
-o-transform: rotateX(180deg);
-ms-transition: 1s;
-ms-transform-style: preserve-3d;
-ms-transform: rotateX(180deg);
transition: 1s;
transform-style: preserve-3d;
transform: rotateX(180deg);
position: absolute;
top: 0;
left: 0;
}
.front {
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
background-color: #00E743;
z-index: 2;
}
.back {
background: #00e743;
-webkit-transform: rotateX(-180deg);
-moz-transform: rotateX(-180deg);
-o-transform: rotateX(-180deg);
-ms-transform: rotateX(-180deg);
transform: rotateX(-180deg);
}
.back > a {
color:#ffffff;
text-decoration:underline !important;
font-size: 14px;
padding: 5px;
display: block;
width: auto;
height: auto;
margin-top: 160px;
text-decoration: none;
}
.back > a:hover {
color:#000000;
background-color:#00e743;
text-decoration:none;
}
<div id="flip_blocks_main">
<div class="flip-container vertical" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" id="front_optic_front"><h1>First: Optic front</h1></div>
<div class="back" id="front_optic_back">First: Optic back</div>
</div>
</div>
<div class="flip-container vertical" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" id="sticker_front"><h1>Second: Stickers front</h1></div>
<div class="back" id="sticker_back">Second: Stickers back</div>
</div>
</div>
<div class="flip-container vertical" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" id="audio_front"><h1>Third: Audio front</h1></div>
<div class="back" id="audio_back">Third: Audio back</div>
</div>
</div>
<div class="flip-container vertical" ontouchstart="this.classList.toggle('hover');">
<div class="flipper">
<div class="front" id="alcantara_front"><h1>4th: Alcantara front</h1></div>
<div class="back" id="alcantara_back">4th: Alcantara back</div>
</div>
</div>
</div>
In your styles for .front you're missing the un-prefixed transform property:
.front {
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
background-color: #00E743;
z-index: 2;
}
If you add it, it appears to work:
.front {
-webkit-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
background-color: #00E743;
z-index: 2;
}

Creating flip card with CSS

I'm trying to create a flip card animation with CSS.
It works well on Firefox, Chrome, Opera, Safari but I have a problem with Internet Explorer (again)...
Look at demo I made : Text problem with Internet Explorer
That's OK in Firefox, Chrome, Opera and Safari !
But my text is inverted with Internet Explorer... Please, tell me what's wrong in my code ?
CSS :
<style>
.flip-container {
-webkit-perspective : 680;
-ms-perspective: 680;
-moz-perspective: 680;
-o-perspective: 680;
perspective: 680;
}
.flip-container:hover .flipper, .flip-container.hover .flipper {
-webkit-transform:rotateY(180deg);
-moz-transform:rotateY(180deg);
-ms-transform:rotateY(180deg);
-o-transform:rotateY(180deg);
transform: rotateY(180deg);
}
.flip-container, .front .back {
width:480px;
height:340px;
}
.flipper {
-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-transition: 2.0s;
-moz-transition: 2.0s;
-ms-transition: 2.0s;
-o-transition: 2.0s;
transition: 2.0s;
position: relative;
}
.front, .back {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
.front {
z-index: 2;
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
-o-transform: rotateY(0deg);
transform: rotateY(0deg); }
.back {
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
-ms-transform: rotateY(180deg);
-o-transform: rotateY(180deg);
transform: rotateY(180deg);
}
</style>
I added an update for latest Internet Explorer versions. It works for each modern desktop browser.
I correct rotation values :
Initial :
Front = 0°
Back = -180°
Hover :
Front = 180°
Back = 0°
This code still need to be updated to be compatible with IE6 IE7 IE8 :
<style>
.flip-container {
-webkit-perspective : 680;
-moz-perspective: 680;
-ms-perspective: 680;
-o-perspective: 680;
perspective: 680;
}
/* For Internet Explorer */
.flip-container:hover .back, .flip-container.hover .back {
-webkit-transform:rotateY(0deg);
-moz-transform:rotateY(0deg);
-ms-transform:rotateY(0deg);
-o-transform:rotateY(0deg);
transform: rotateY(0deg);
}
/* For Internet Explorer */
.flip-container:hover .front, .flip-container.hover .front {
-webkit-transform:rotateY(180deg);
-moz-transform:rotateY(180deg);
-ms-transform:rotateY(180deg);
-o-transform:rotateY(180deg);
transform: rotateY(180deg);
}
.flip-container, .front .back {
width:480px;
height:340px;
}
.flipper {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
position: relative;
}
.front, .back {
-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: 2.0s;
-moz-transition: 2.0s;
-ms-transition: 2.0s;
-o-transition: 2.0s;
transition: 2.0s;
position: absolute;
top: 0;
left: 0;
}
.front {
z-index:2;
-webkit-transform: rotateY(0deg);
-moz-transform: rotateY(0deg);
-ms-transform: rotateY(0deg);
-o-transform: rotateY(0deg);
transform: rotateY(0deg);
}
.back {
z-index:1;
-webkit-transform: rotateY(-180deg);
-moz-transform: rotateY(-180deg);
-ms-transform: rotateY(-180deg);
-o-transform: rotateY(-180deg);
transform: rotateY(-180deg);
}
</style>

CSS rotateX around center

Alright. I've done quite a bit of research, but I wasn't able to come up with anything. After possibly over-thinking the problem, here is what I'd appreciate your help with.
I would like to be able to rotate a <div> around its center so its backside becomes visible. I was able to do that with rotateY--without any problems. But when using rotateX the <div> does not rotate around its center anymore.
The CSS:
.flip-container {
font-size: 30px;
-webkit-perspective: 1000;
-moz-perspective: 1000;
margin: 0 auto;
color: black;
}
.flip-container:hover .flipper {
-webkit-transform: rotateX(180deg);
-moz-transform: rotateX(180deg);
-o-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
}
.flipper {
-webkit-transition: 0.6s;
-webkit-transform-style: preserve-3d;
-moz-transition: 0.6s;
-moz-transform-style: preserve-3d;
position: relative;
}
.front, .back {
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
background: transparent;
}
.front {
z-index: 1;
}
.flip-container, .front, .back {
width: 200px;
height: 200px;
}
.back {
-webkit-transform: rotateX(-180deg);
-moz-transform: rotateX(-180deg);
-o-transform: rotateX(180deg);
-ms-transform: rotateX(180deg);
This problem is driving me up the walls. I know it's something small I overlooked; but I can't find it. Any helps or hints would be greatly appreciated. :)
Fiddle
For a vertical rotation, you need to specify transform-origin, with :
<x> : 50%
<y> : half height of the div
Updated Fiddle
.flipper {
-webkit-transform-origin: 50% 100px;
-moz-transform-origin: 50% 100px;
-o-transform-origin: 50% 100px;
-ms-transform-origin: 50% 100px;
transform-origin: 50% 100px;
-webkit-transition: 0.6s;
-webkit-transform-style: preserve-3d;
-moz-transition: 0.6s;
-moz-transform-style: preserve-3d;
position: relative;
}

AngularJS: with ng-animate & ng-view, how to make a 3D cube rotation effect?

I'm trying to get a 3D cube effect animation with ng-animate and ng-view.
When I switch to another page, I would like to feel like I’m rotating on a cube.
When I click on "Go Page 2", the actual "Page 1" would leave and rotate to the left and the "Page 2" would arrive from the right.
I’ve got something approaching but with really dirty CSS transitions and when I switch pages, they are not "stick" together.
Code sample: http://jsfiddle.net/bnyJ6/
I've tried like this:
HTML :
<style ng-bind-html-unsafe="style"></style>
<div class="cube container">
<div ng-view ng-animate="{enter: 'animate-enter', leave: 'animate-leave'}" ></div>
</div>
<script type="text/ng-template" id="page1.html">
<div class="container " >
<div class="masthead">
<h1 class="muted">PAGE 1</h1>
<button class="btn display-button" ng-click="direction('front');go('/two')">Go Page 2</button>
</div>
</div>
</script>
<script type="text/ng-template" id="page2.html">
<div class="container " >
<div class="masthead">
<h1 class="muted">PAGE 1</h1>
<button class="btn display-button" ng-click="direction('back');go('/one')" >Go page 1</button>
</div>
</div>
</script>
Angular JS :
var app = angular.module('demo', []);
app.config(function ($routeProvider) {
$routeProvider
.when('/one', {
templateUrl:'page1.html'
})
.when('/two', {
templateUrl:'page2.html'
})
.otherwise({
redirectTo:'/one'
});
});
app.controller('MainCtrl', function($scope, $rootScope, $location) {
$scope.go = function(path) {
$location.path(path);
}
});
CSS3-Dirty- Animation:
.animation{
-webkit-perspective:2000px;
-moz-perspective:2000px;
-o-perspective: 2000px;
perspective: 2000px;
}
.cube {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
position: relative;
}
.animate-enter,
.animate-leave {
-webkit-transition: 3000ms linear all;
-moz-transition: 3000ms linear all;
-ms-transition: 3000ms linear all;
-o-transition: 3000ms linear all;
transition: 3000ms linear all;
position: absolute;
}
.animate-enter {
background-color:green;
-webkit-transform: rotateY( 90deg ) translateZ(600px ) translateX(585px) ;
-moz-transform: rotateY( 90deg ) translateZ(600px ) translateX(585px);
-o-transform: rotateY( 90deg ) translateZ( 600px ) translateX(585px);
transform: rotateY( 90deg ) translateZ( 600px) translateX(585px);
opacity: 0;
}
.animate-enter.animate-enter-active{
background-color:yellow;
-webkit-transform: rotateY( 0deg ) translateX(250px) translateZ(400px );
-moz-transform: rotateY( 0deg ) translateX(250px) translateZ(400px );
-o-transform: rotateY( 0deg )translateX(250px) translateZ(401px );
transform: rotateY( 0deg ) translateX(250px) translateZ( 400px );
opacity: 1;
}
.animate-leave {
background-color:gray;
-webkit-transform: rotateY( -90deg ) translateZ( 361px );
-moz-transform: rotateY( -90deg ) translateZ( 361px );
-o-transform: rotateY( -90deg) translateZ( 361px );
transform: rotateY( -90deg) translateZ( 361px );
opacity: 0;
}
Have you any idea of how get this 3D Cube effect animation?
Thanks for all kind of help you can provide.
I'd like to throw this into the ring:
http://jsfiddle.net/bnyJ6/1/
.animation{
-webkit-perspective:2000px;
-moz-perspective:2000px;
-o-perspective: 2000px;
perspective: 2000px;
}
.cube {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
position: relative;
}
.animate-enter,
.animate-leave {
-webkit-transition: 3000ms linear -webkit-transform, 3000ms linear opacity, 3000ms linear background-color;
-moz-transition: 3000ms linear -moz-transform, 3000ms linear opacity, 3000ms linear background-color;
-o-transition: 3000ms linear -o-transform, 3000ms linear opacity, 3000ms linear background-color;
transition: 3000ms linear transform, 3000ms linear opacity, 3000ms linear background-color;
position: absolute;
}
.animate-enter {
background-color: green;
-webkit-transform-origin: 0% 50%;
-moz-transform-origin: 0% 50%;
-o-transform-origin: 0% 50%;
transform-origin: 0% 50%;
-webkit-transform: translateX(100%) rotateY(90deg);
-moz-transform: translateX(100%) rotateY(90deg);
-o-transform: translateX(100%) rotateY(90deg);
transform: translateX(100%) rotateY(90deg);
opacity: 0;
}
.animate-enter.animate-enter-active {
background-color: yellow;
-webkit-transform: translateX(0%) rotateY(0deg);
-moz-transform: translateX(0%) rotateY(0deg);
-o-transform: translateX(0%) rotateY(0deg);
transform: translateX(0%) rotateY(0deg);
opacity: 1;
}
.animate-leave {
-webkit-transform-origin: 100% 50%;
-moz-transform-origin: 100% 50%;
-o-transform-origin: 100% 50%;
transform-origin: 100% 50%;
}
.animate-leave.animate-leave-active {
background-color: gray;
-webkit-transform: translateX(-100%) rotateY(-90deg);
-moz-transform: translateX(-100%) rotateY(-90deg);
-o-transform: translateX(-100%) rotateY(-90deg);
transform: translateX(-100%) rotateY(-90deg);
opacity: 0;
}
The trick is to shift the transform-origin to the right for the first element, and to the left for the second element, that way both elements are transformed around the same point, making it look as if they were connected.
In order to make it finally work, the transition properties need to be targeted separately, otherwise it would animate the transform-origin property too, which would look funky. One would think that the proper use of setup and active classes for NgAnimate would prevent this behaviour, but unfortunately it doesn't. I guess the delay that Angular uses (currently 1 millisecond) before adding the active classes is too short.
ps. I guess you already knew, but this is not IE compatible.
I just modified ur css...have a look if it looks better...can be improved further
http://jsfiddle.net/ctdrY/
Modified class
.animate-enter.animate-enter-active{
background-color:yellow;
-webkit-transform: rotateY( 0deg ) translateX(50px) translateZ(400px );
-moz-transform: rotateY( 0deg ) translateX(50px) translateZ(400px );
-o-transform: rotateY( 0deg )translateX(50px) translateZ(401px );
transform: rotateY( 0deg ) translateX(50px) translateZ( 400px );
opacity: 1;
}

CSS3 Transform Translate3D IE10

according to IE 10's supported technologies what I am trying to accomplish should be working, but I cannot figure out what is going on. in firefox and chrome it works just like it should, but in IE10 it is rendered incorrectly.
I have exhausted IE's support doc's, and like I said, this should be working.
here is the JS Fiddle [JSFiddle]: http://jsfiddle.net/qzDV3/1/
body
{
background-color:Blue;
overflow:hidden;
}
#tumble
{
position:absolute;
top:70%;
left:5%;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transition: all 1s;
-moz-transition: all 1s;
transition: all 1s;
}
#tumble.tumble
{
left:100%;
top:85%;
-webkit-transform:rotate3d(1, -1, 1, 256deg);
-moz-transform:rotate3d(1, -1, 1, 256deg);
transform:rotate3d(1, -1, 1, 256deg);
}
.box
{
position:absolute;
top:0%;
left:0%;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform:rotate3d(1, 1, 1, -30deg);
-moz-transform:rotate3d(1, 1, 1, -30deg);
transform:rotate3d(1, 1, 1, -30deg);
-webkit-transition: all .5s;
-moz-transition: all .5s;
transition: all .5s;
}
.box.rotate
{
-webkit-transform:rotate3d(1, -1, 1, 256deg);
-moz-transform:rotate3d(1, -1, 1, 256deg);
transform:rotate3d(1, -1, 1, 256deg);
}
.front, .back
{
top:0;
left:0;
}
.front
{
-webkit-transform: translate3d(0,0,100px);
-moz-transform: translate3d(0,0,100px);
transform: translate3d(0,0,100px);
}
.back
{
-webkit-transform: translate3d(0,0,-100px);
-moz-transform: translate3d(0,0,-100px);
transform: translate3d(0,0,-100px);
}
.left, .right
{
top:0;
-webkit-transform: rotateY(90deg);
-moz-transform: rotateY(90deg);
transform: rotateY(90deg);
}
.left
{
left:-100px;
}
.right
{
left:100px;
}
.front, .back, .left, .right, .bottom
{
position:absolute;
border:2px solid #CF985D;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
background-image:url(SRC/Images/cardboard_texture_02.jpg);
width:200px;
height:200px;
}
.bottom
{
top:100px;
-webkit-transform: rotateX(90deg);
-moz-transform: rotateX(90deg);
transform: rotateX(90deg);
}
.top1, .top2
{
position:absolute;
border:2px solid #CF985D;
background-image:url(SRC/Images/cardboard_texture_02.jpg);
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.top1, .top2
{
top:0px;
left:0;
width:100px;
height:200px;
}
.top2
{
right:0;
}
.outer1, .outer2
{
position:absolute;
width:200px;
height:200px;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.outer1
{
-webkit-transition: all 1s;
-moz-transition: all 1s;
transition: all 1s;
-webkit-transform: rotateX(90deg);
-moz-transform: rotateX(90deg);
transform: rotateX(90deg);
}
.outer2
{
-webkit-transition: all 2s bounce;
-moz-transition: all 2s bounce;
transition: all 2s bounce;
-webkit-transform: rotateX(90deg) rotateY(180deg);
-moz-transform: rotateX(90deg) rotateY(180deg);
transform: rotateX(90deg) rotateY(180deg);
}
.outer1:hover
{
-webkit-transform: rotateX(90deg) rotateY(180deg);
-moz-transform: rotateX(90deg) rotateY(180deg);
transform: rotateX(90deg) rotateY(180deg);
}
.outer2:hover
{
-webkit-transform: rotateX(90deg) rotateY(0deg);
-moz-transform: rotateX(90deg) rotateY(0deg);
transform: rotateX(90deg) rotateY(0deg);
}
.outer1
{
left:-100px;
top:-100px;
}
.outer2
{
right:-300px;
top:-100px;
}
.outer1.close
{
-webkit-transform: rotateX(90deg) rotateY(180deg);
-moz-transform: rotateX(90deg) rotateY(180deg);
transform: rotateX(90deg) rotateY(180deg);
}
.outer2.close
{
-webkit-transform: rotateX(90deg) rotateY(0deg);
-moz-transform: rotateX(90deg) rotateY(0deg);
transform: rotateX(90deg) rotateY(0deg);
}
any suggestions?
IE10 does not support preserve-3d option for transform-style.
CSS3 - 3D Flip Animation - IE10 transform-origin: preserve-3d workaround
Why doesn't IE10 display nested CSS3 3D transformed elements?

Resources