Problem:
I use CSS to flip the card and show the kitten. There is a behavior that, apparently, exists only in Firefox, due to which it constantly moves / resizes images by several pixels. Just move the mouse pointer over the map back and see how it moves around the small one after , the scale animation ends, then flips the map over, clicking on it to watch the kitten adjust its position and size after the animation.
Again, this does not happen in Chrome and Internet Explorer. Can someone explain what causes it or provide a remedy?
Scenario:
http://jsfiddle.net/XEDEM/1/
Code:
$('.card').mouseover(function() { $(this).css({ 'transform': 'scale(1.2)', '-webkit-transform': 'scale(1.2)', 'transition': 'transform 500ms', '-webkit-transition': '-webkit-transform 500ms' }); }).mouseleave(function() { $(this).css({ 'transform': 'scale(1)', '-webkit-transform': 'scale(1)', 'transition': 'transform 500ms', '-webkit-transition': '-webkit-transform 500ms' }); }).mousedown(function() { $('div.back').css({ 'transform': 'perspective(1000px) rotateY(-180deg) translateZ(0)', '-webkit-transform': 'perspective(1000px) rotateY(-180deg)', 'transition': 'transform 800ms ease-in-out 300ms', '-webkit-transition': '-webkit-transform 800ms ease-in-out 300ms' }); $('.hide').show(); $('div.front').css({ 'transform': 'perspective(1000px) rotateY(0) translateZ(0)', '-webkit-transform': 'perspective(1000px) rotateY(0)', 'transition': 'transform 800ms ease-in-out 300ms', '-webkit-transition': '-webkit-transform 800ms ease-in-out 300ms', 'backface-visibility': 'hidden', '-webkit-backface-visibility': 'hidden' }); });
source share