Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backface-Visibility Not Working Properly in Firefox (Works in Safari)

Tags:

I'm having a problem with the back face-visibilty property. It works how I want it to in Safari/Chrome, but for some reason it's not working correctly in Firefox.

When the box flips, I get a mirror image of the front face.

like image 900
realph Avatar asked Mar 07 '12 16:03

realph


People also ask

Can I use Backface-visibility hidden?

That's because the default for backface-visibility is visible . Instead of it being visible, you could hide it.

How does Backface-visibility work?

The backface-visibility property defines whether or not the back face of an element should be visible when facing the user. The back face of an element is a mirror image of the front face being displayed. This property is useful when an element is rotated. It lets you choose if the user should see the back face or not.

What happens when an element is styled as follows Backface-visibility hidden?

The back face is visible when turned towards the user. The back face is hidden, effectively making the element invisible when turned away from the user.


2 Answers

This bug has been acknowledged by Mozilla.

The fix is to add transform: rotateX(0deg) to the front and back objects.

Adding backface-visiblity:hidden on the container, as suggested by @yalia, makes the back unresponsive in Chrome, hence that fix should be avoided.

Here's a fiddle with the fix.

like image 54
Noel Abrahams Avatar answered Sep 28 '22 05:09

Noel Abrahams


Try putting 'backface-visibility:hidden' both on the object and its container. This is what worked for me with this bug

like image 20
yalia Avatar answered Sep 28 '22 05:09

yalia