After looking through IE10's developer blog I have found that they do not support the preserve-3d setting.
They do offer a workaround, but I can not seem to get it working. My example below works in Safari, Chrome and Firefox but not IE10. If anyone could help me achieve this I would be very thankful.
The boxes should rotate around the Y axis on click to show some text and a green background color. This is not the case in IE10
My example: http://codepen.io/2ne/pen/zEpge
Part of code:
HTML
<div class="flip-wrapper">
<div class="front"></div>
<div class="back">IE10 SUCKS</div>
</div>
CSS
.flip-wrapper {
cursor: pointer;
height: 100%;
-moz-perspective: 1000;
-webkit-perspective: 1000;
-ms-perspective: 1000;
perspective: 1000;
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
width: 100%;
}
.flip-wrapper .front,
.flip-wrapper .back {
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
height: 100%;
position: absolute;
width: 100%;
}
.flip-wrapper .back {
background: none repeat scroll 0 0 #298F68;
-webkit-transform: rotateY(180deg);
-moz-transform: rotateY(180deg);
transform: rotateY(180deg);
}
.flip-wrapper.flipped {
cursor: default;
-webkit-animation: flip 500ms 1;
-moz-animation: flip 500ms 1;
animation: flip 500ms 1;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
-ms-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
2ne
Here is a far simpler flip algorithm, which will also work in IE. https://jsfiddle.net/mff4jzd2/8/
JAVASCRIPT:
CSS:
HTML:
here is a very simple version of Nicholls
flipping rectangle
I left only the flip code.
Btw, great effects Nicholls !
I also couldn't seem to find a good example of this anywhere, so I spent
someway too much time making my own.This one works on all browsers, does not have that weird 360deg IE flip, and includes provision for static content (that lives on both sides of the card - which I needed to put a 'flip' button at the top right of both sides).
--I tested on latest versions of Chrome, Firefox, Safari, Opera, and IE.
http://jsfiddle.net/Tinclon/2ega7yLt/7/
Edit: Also works with transparent backgrounds: http://jsfiddle.net/Tinclon/2ega7yLt/8/
The css (of course) includes IE hacks, so it's a bit long, but the html is quite straightforward:
As the OP notes, there is an answer to the question on their blog, but sadly he did not quote:
In summary, as normal, Microsoft's Browser is badly broken.
On further investigation, it seems that the interpolation engine is incomplete or broken in IE10; applying everything in terms of matrix transforms causes 'random' flips to occur when rotation about more than one axis is involved. The only method of matrix interpolation would be to manually handle all interpolation manually. Further, it seems that any interpolation where a right angle is involved will cause inconsistent 'random' flipping.
I have succeeded in interpolating the required css, however (minified), the code is thousands of lines long. So, yeah, IE can do 3d css, if you don't mind pre-compiling and long wait-times.
Found the answer here. Posted my own updated fiddle here - this is the css (I included ms prefixes only for brevity):
Here is a button handler for flipping (in addition to the hover event):
Interesting (and somewhat troubling) that the answer for IE10 is flipping by 360 degrees (the 'flipped' class and hover event in the css). Still wrapping my head around that one.
Here's hoping they implement preserve-3d soon.
Use a browser-determiner JS or any other method to apply CSS-styles to IE only.
Then use the following code: