Hey, I don't know if you keep looking for an answer. A couple of days ago I had the same problem as animating a div with a PNG image inside. I have tried many solutions, and the only one that worked perfectly is the one that I encoded myself.
The problem is that IE does not support opacity support and proper PNG support, therefore, after applying the opacity effect, it interrupts PNG display (I believe that animated frames rely on MSIE's proprietary AlphaImageLoader filter for opacity effect for IE). A curious thing (for me this still does not understand very well) is that this problem can be solved using the same filter to load the image before animation.
I wrote a simple javascript that applies a filter to each image with a .PNG extension. My animations work fine with IE.
I will copy the code below. I am structure independent (this is pure JavaScript), but you have to put it in your finished DOM event (or use domready.js, like me).
var i; for (i in document.images) { if (document.images[i].src) { var imgSrc = document.images[i].src; if (imgSrc.substr(imgSrc.length-4) === '.png' || imgSrc.substr(imgSrc.length-4) === '.PNG') { document.images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true',sizingMethod='crop',src='" + imgSrc + "')"; } } }
Please let me know if it works well for you, and if the animation is smooth. Regards!
Alejandro Iglesias Nov 08 '10 at 17:57 2010-11-08 17:57
source share