This is a post first posted at s[URL=”http://stackoverflow.com/questions/13739807/why-the-matrix-filter-does-not-work-in-ie”]tackoverflow
I try to rotate the elment in ie, so I use the matrix filter,html:
[code=html]<div id=”car” style=”position: absolute; width: 52px; height: 26px; -moz-transform: rotate(45deg); left: 20px; top:206px; z-index: 1000;”>
<img src=”http://i.stack.imgur.com/dcwtR.png” />
</div>
Then add the filter:
[CODE] var a=document.getElementById(“car”),b=45;
a.style.filter = ‘progid:DXImageTransform.Microsoft.Matrix(sizingmethod=”auto expand”)’;
var e = Math.cos(b * Math.PI / 180),
c = Math.sin(b * Math.PI / 180),
g = a.filters.item(0);
g.M11 = g.M22 = e;
g.M21 = -c;
g.M12 = c;
Then the div is rotated, but there are a black outline around the image.
[URL=”JsFiddle”]JsFiddle
Note the black outline:[ATTACH=CONFIG]15259[/ATTACH]
[canned-message]attachments-removed-during-migration