Jump to content
Search Community

TweenLite Rotation misbehaving in IE9

awp.black.69 test
Moderator Tag

Go to solution Solved by Jonathan,

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

I am trying to rotate an element(button) counter-clockwise 90deg using TweenLite. It is working fine in chrome and firefox but misbehaving in IE9. Expected behavior is that it only rotate but in IE9 along with rotation it is changing is position also. This behavior is consistent in IE9 and is produced only in special case, with simple rotation test in IE9 the behavior is as expected.


Here is a video for reference (notice the button labeled button 17):



The HTML of button looks something like:

<div data-id="animWrapper_spin9ivgo7os" style="height: 11.2%; width: 8.65979381443299%; position: absolute; top: 17.6%; left: 67.5257731958763%; z-index: 8; -webkit-perspective: 400; -webkit-backface-visibility: visible; -webkit-transform-style: preserve-3d; display: block;">
<button checked="checked" tagname="BUTTON" src="" srcsize="0" srcduration="" srcformat="" domstyle="[object Object]" name="button 17" class="button adelem" data-id="9ivg" adtype="button" style="width: 100%; height: 100%; left: 0px; top: 0px; z-index: 8; -webkit-perspective: 400; -webkit-backface-visibility: hidden; -webkit-transform-style: preserve-3d;">button 17</button>

The rotation is applied to the div wrapping the button [data-id=animWrapper_spin9ivgo7os], which is inside another iframe.



I am unable to reproduce the error in simple page. Please help me if someone know what could have been the reason.

Link to comment
Share on other sites

Hi Jonathan,


I am using Window 7 Professional with stand alone IE9 (not emulated), version 9.0.8112.16421.



Diaco.AW : That's the problem, when I try to create a reduces demo it works fine. As I told this is very specific to my page (an Ad to be more precise).


Here is a test link:



I have managed to create a very simple ad, though you wont be able to see the source as it is minimized.

Link to comment
Share on other sites

Hello awp.black.69,


When i look at your code example above you are only displaying HTML markup but no JS GSAP code.


In that HTML markup above you have webkit specific vendor prefixed CSS properties. That would not work in IE.


These properties with webkit only work in Chrome and Safari, or/and Chromium Based Browser.


style=" -webkit-perspective: 400; -webkit-backface-visibility: hidden; -webkit-transform-style: preserve-3d;"


You would have to remove them and use the GSAP set() method to apply your transform styles. This way you allow GSAP to handle the cross browser prefixes (if needed) for each browser.


Also some of those CSS properties wont work in IE. Check this out .. backface-visibility or perspective is not supported in IE9 caniuse.com:





I have some questions:

  • Are you positioning your elements with CSS position absolute or relative.
  • Are you using the latest version of GSAP?
  • Are you animating left / top CSS properties or are you animating x (translateX) and y (translateY) in GSAP

This will be hard to debug with your source code minimized. I would suggest to just take your GSAP code and make a simple limited example in codepen. Just a simple example of your GSAP code. This way we can help you better by editing your code in a live editable environment.


Here is an example by GreenSock on How to create a codepen demo example.


Thank You! :)

  • Like 2
Link to comment
Share on other sites

  • Solution

Hello awp.black,


Since the filter is causing an issue in IE9 when rotating.. then you can just apply the filter gradient (IE6-9) on a nested <span> tag like this:


Try this in IE9:

See the Pen YPKbyy by jonathan (@jonathan) on CodePen


  position: absolute;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 5px;

#rotate > span {  
  /* IE6-9 filter gradient */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0284d2', endColorstr='#2660db',GradientType=0 ); 


display: block ..  makes the <span> tag display property block, so it fills its parents space. By default <span> tags have their display property set to inline.


and your #rotate button HTML markup would look like this:


<button id="rotate">
     <span>Click Rotate(Bottom Right)</span>


This way your gradient filter is applied to a child of your #rotate button. And the transform rotate is just applied to the #rotate button (the parent) not causing the conflict.


Does this help? :)

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