CSS Parallax Working Beautifully in Chrome But Not Firefox

CSS Parallax working beautifully in Chrome but not Firefox

You can checkout http://caniuse.com it shows you what every browser supports or not. Every browsers is different as you know, there might be elements on Edge and FF that might not be supported like they are on Chrome.

Cropped 3D CSS elements in Chrome or no 3D at all in Firefox

I was able to fix this by creating separated containers with their own perspective for each parallax scene, instead of having them all under the states div with a single control.

So basically instead of:

 /* on 'body' mousemove change '.states' perspective-origin */

Now I'm doing:

 /* on 'body' mousemove change '.current.state .parallax' perspective-origin */

And it works for Chrome and Firefox, without cropping. Of course, the .state { transform-style: preserve-3d; } was not needed at all.



Related Topics



Leave a reply



Submit