I worked with CSS3 rotary transforms on my page when I noticed a mismatch with the backface-visibility property when its value is "hidden". I reproduced the problem in JSFiddle .
HTML:
<div class="card"> <div class="front"> <button>Flip to the back face</button> </div> <div class="back"> <button>Flip to the front face</button> </div> </div>
This code should represent a map with a โfrontโ div on the front and a โbackโ on the back. I use the backface-visibility property so that during mirroring the map does not display the mirror contents of the front surface.
If you open the script in Firefox, you will notice that clicking the โFlipโ button will lead to the mirror โFlipโ button on the right side of the page, although the backface-visibility property is โhiddenโ for the front div. Pressing the Flip button (not a mirror) will flip the map to its original position, and the flip Mirror button will disappear.
If you open the fiddle in Chrome, clicking the โFlipโ button does not create a mirrored โFlipโ button, which is good. Unfortunately, the Flip button on the back is no longer available.
Thus, the behavior of the backface-visibility property is undesirable in both browsers. How can I change my code so that the mirrored content is not visible and everything remains clickable in both browsers?
Update: setting background for the "back" div to #FFF (or any color) makes it opaque, hiding the mirror button from the "front" div when running the script in Firefox. Chrome issues still remain.
source share