Jump to content
Search Community

autoAlpha issue with SVG in IE11

marcusk 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

Hi,

 

I've searched the forums and on google for this issue I'm having, but unable to find an answer.  Hoping someone can help.  

 

In my simple animation test, I have 2 orange squares that slightly overlap each other.  When the opacity goes from 1 to 0, both squares fade away nicely in Chrome.


However, in IE11, the opacity is not gradually disappearing.  The 2 squares just disappear in an instant.  I can make this work in IE11 if I target both of the square's classes, but then what happens is, the overlapping part of the square becomes apparent and just looks odd.  

 

My codepen example presents this issue clearly.  I know some users may not be able to run this in IE, so I've also created this in an html and javascript file zipped.

 

Any thought to why this is happening and how I can make the opacity work in IE like chrome?  

GS-TEST.zip

See the Pen eYOyQzP by marcusk7 (@marcusk7) on CodePen

Link to comment
Share on other sites

It is likely because of how position: absolute; elements are handled in IE11. By making the container element's position be relative, you're forcing the elements to be positioned in respect to that element (and it's easier for the browser to know what its opacity should be). Otherwise I think IE11 is getting confused what the opacity should be because technically those elements are being positioned in respect to the body. 

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