I'm trying to code flip transition animation in css3, but I get different results in Chromium and Firefox. Screenshots in Firefox:
normal: http://prntscr.com/2dx4rv
hover: http://prntscr.com/2dx58d
Chromium just flips the image. Literally:
normal: http://prntscr.com/2dx5o4
hover: http://prntscr.com/2dx6k4
Here's the markup:
<a href="page2.html">
<div class="flip-wrap">
<div class="flipper">
<div class="front">
<img src="IMG_0003.JPG" class="akImg" />
</div>
<div class="back">
<h5>Lorem Ipsum</h5>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
</p>
</div>
</div>
</div>
</a>
And the css:
.flip-wrap {
position: absolute;
width: 200px;
height: 200px;
top: 0px;
left: 0px;
}
.akImg {
position: absolute;
width: 200px;
height: 200px;
top: 0px;
left: 0px;
}
.flipper {position: relative;}
.front {position: absolute;top: 0%; left: 0%; z-index: 100; width: 100%; height: 100%;}
.back {position: absolute;top: 0%; left: 0%;
background-color: blue}
.back p {margin-top: -10px; margin-left: 5px; font-size: 0.8em}
.back h5 {margin-top: 10px; margin-left: 5px;}
.flip-wrap {
perspective: 1000;
-webkit-perspective: 1000;
}
.flip-wrap:hover .flipper, .flip-wrap.hover .flipper {
transition-delay: 0.2s;
transform: rotateY(180deg);
-webkit-transition-delay: 0.2s;
-webkit-transform: rotateY(180deg);
}
.flipper {
transition: 0.6s;
transform-style: preserve-3d;
-webkit-transition: 0.6s;
-webkit-transform-style: preserve-3d;
}
.front, .back {
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
.back {
transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
}
Is there any way to achieve same effect in Chromium as in Firefox? I think I've prefixed everything with -webkit-, so that shouldn't be the problem(btw, isn't Chromium on Blink now? Still using -webkit?).
Tried to solve with:
applying -webkit-backface-visibility: hidden to children of front and back(.front *, back *),
setting opacity to 0.99,
enabling Override software rendering list
in flags
adding -webkit-transform: rotateY(0deg)
... bot none worked. Any more suggestions?
EDIT: possibly relevant, http://prntscr.com/2e4vhr. Here's the site: http://www.queness.com/resources/html/css3dflip/. As that's some kind of a tutorial, I don't expect it to have major errors in the code. Could this possibly be a webkit bug?