Jump to content
GreenSock

s3n3r

Issue with 3d transform + text

Recommended Posts

I have a weird issue when non-animated element /  3d animated elements overlaps.

 

As you ll see on the codepen (bugs only on safari) :

 

 

It works fine on Chrome, Opera, and Firefox (couldnt try on IE)

 

Please advise, i'm running out of idea...

See the Pen yYeroj by s3n3r (@s3n3r) on CodePen

Link to comment
Share on other sites

Hi s3n3r  :)

 

i can't test that on Safari right now , but if i understood correctly , seems there's a solution :

 

pls add this to your #img-wrapper css :

 

  -webkit-transform :scale(1,1);
      -ms-transform :scale(1,1);
          transform :scale(1,1);

or 

  -webkit-transform :translateZ(0px);
          transform :translateZ(0px);

http://stackoverflow.com/questions/5472802/css-z-index-lost-after-webkit-transform-translate3d

 
  • Like 2
Link to comment
Share on other sites

Can confirm the issue in Safari and also that Diaco's answer fixes the issue.

  • Like 1
Link to comment
Share on other sites

Nice catch Diaco! To add to Diacos great advice...

 

Since you will not be using z (translateZ) and setting it to zero (0) .. then there is really no need to use the CSS perspective  property.

// you can comment out this line since you will not be using translateZ (z)
// TweenMax.set($('body'), {perspective:500});

Since perspective  calculates the distance between the z-axis of zero (0) and the user, in order to give the element that 3D perspective look.

 

Resource:

W3C The Transformation Functions (perspective) : http://www.w3.org/TR/2009/WD-css3-3d-transforms-20090320/#transform-functions

 

;)

  • Like 2
Link to comment
Share on other sites

Cool just tried and it seem to works fine (however i didn't try on my "main website", this was only a extract of the issue area).

 

Thanks Diaco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×