Jump to content
Search Community

y percent render differently in different browser

agoago test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Here is a video of ypercent animation in chrome

 

 

 

Here is a video of ypercent animation in safari

 

 

 

You can see in chrome it works perfectly. In safari, the button move down a bit after it finishes it's animation

 

The animation proptery used in this is bottom and ypercent.

Link to comment
Share on other sites

Unfortunately, it isn't very practical for us to dig through a live site trying to find the js and css responsible for the problem.

 

CodePen or jsfiddle are much better as we can actually edit the code and test our theories.

 

Please provide a basic CodePen with just enough JS, HTML and CSS to illustrate the problem. We don't need to see things in the context of a fully interactive demo as there will likely be tons of code not related at all to the problem that we will need to sift through. 

 

The simpler your demo the better. From your description it should be as simple as a single tween.

 

Thanks!

  • Like 1
Link to comment
Share on other sites

i went ahead and copied the css from your site and a few divs that had inline styles applied via GSAP and pasted them into a CodePen:

 

See the Pen eWLgGE by GreenSock (@GreenSock) on CodePen

Open that in Chrome and Safari and you will see there is a variance in the vertical placement.

 

As you can see, identical code is rendering differently in different browsers. GSAP will only animate the values you tell it to, it can't control how the browser will interpret those values.  It might be worthwhile to take some time and figure out the css end values that render consistently cross-browser and then plug those into your animation code.

 

  • Like 3
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.
×
×
  • Create New...