I’m trying to animate an image on hover by flipping it upside-down (180 deg) along the x-axis.
Just like here
Except I can’t get it to work for some reason.
img {
transition:all 2s ease-in-out;
perspective: 800px;
perspective-origin: 50% 100px;
}
img:hover {
transform:rotateX(180deg);
}
According to this page, Chrome still needs the
-webkitprefix.You’re missing the browser prefix.
This also means that you’ll need to add in the other browser prefixes for their respective browsers. If you would rather not mess around with browser prefixes, you can use a plugin called prefixfree.js by Lea Verou to take care of it all for you.