Frankie Pugliese
Frankie Pugliese

Reputation: 11

GSAP Tween background size does not work properly in ios/ipads

Using gsap tweenmax (lite or timelinelite) the backgroundSize works properly on browsers but does not on ios/ipads

Take a look at this on browser and for the error on iPad. Any help would be much appreciated. http://codepen.io/jonathan/pen/AigpI

// cache element in variable
var $img = $('#box');
// set initial CSS autoAlpha to 0  
// GSAP handles the cross browser vendor prefixes
TweenMax.set($img,{backgroundSize:"100% 100%"});
// animate CSS autoAlpha to 1
var freewayEaseTween = TweenMax.to($img, 10, {
  backgroundSize: "+=25% +=25%", 
  autoRound:false, 
  repeat:-1,
  yoyo:true,
  ease:Power1.ease0ut
});
freewayEaseTween.play(); 

Upvotes: 1

Views: 775

Answers (1)

Jack
Jack

Reputation: 2970

Answered in the GreenSock forums: http://greensock.com/forums/topic/14594-background-size-does-not-work-properly-in-iosipads/?p=62376

It had to do with an inconsistency in the way Safari reports the computed style (omits the 2nd value). It should be resolved in the upcoming release of GSAP which you can preview (link in the forums post).

Upvotes: 1

Related Questions