why the matrix filter does not work in ie
This is a post first posted at stackoverflow,but I got no answer,so I post it here,once get an solution,I will post it at stackoverflow.
I try to rotate the elment in ie, so I use the matrix filter,html:
Then add the filter:
<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" />
Then the div is rotated, but there are a black outline around the image.
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;
Note the black outline:Jj3Rd.png
Just a guess, but it could be due to the fact that the image is a .png. If the black outline is actually transparent in the original image, you could be seeing an artifact of Microsoft's original .png image handler which didn't do well with .png transparency as I recall. You might try converting the image to .gif as a test.
Does the image need to rotate dynamically?
We have to change the rotatation according to the data by server.
You can find some details about our application here;
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)