Jump to content
Search Community

backgroundPositonY property does not work on firefox

bokan 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

Hello bokan, and welcome to the GreenSock Forum!


Have you tried just using the shorthand background-position property?


Firefox expects it to be the shorthand method, and considers background-position-x and background-position-y to be non-standard. So its best to just use the background-position shorthand property so you can keep your code standards and compliant cross browser.




There is currently a bug report for Mozilla about this:




But Firefox will keep it out of their browser since it is not part of the CSS3 spec. Chrome and Safari webkit have those properties but they will report different values with the shorthand version when zoomed in/out and are not to be trusted.


So to play it safe just use the background-position (backgroundPosition) shorthand property.


More info:








  • Like 4
Link to comment
Share on other sites



Yep, indeed using backgroundPositionY in the config object has no effect whatsoever. The solution could be use both values and just change the one corresponding to the Y axis, like this:

// we're assuming that the original background position in the CSS styles is 100px 100px, for the X and Y axis respectively.
TweenLite.to(element, 1, {backgroundPosition:"100px 0px"});

PS: I see Jonathan beat me to it and His answer is far better and complete than mine, nice job Jonathan!!

  • Like 4
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...