日期:2014-05-16  浏览次数:22468 次

怎么使网页里的图片倾斜?

效果如上。
不能用CSS3,因为好多浏览器还是IE6

------解决方案--------------------
<img src="http://avatar.profile.csdn.net/A/9/7/2_theforever.jpg" 
 style="filter:progid:DXImageTransform.Microsoft.Matrix( SizingMethod='auto expand',FilterType=bilinear,Dx=0,Dy=0, M11=0.9,M12=0.5,M21=-0.5,M22=0.9)">
------解决方案--------------------
filter : progid:DXImageTransform.Microsoft.Matrix(SizingMethod=auto expand,FilterType=bilinear,Dx=0,Dy=0,M11=1,M12=-0.2,M21=0.2,M22=1);

Matrix兼容性:IE5.5+
语法:
CSS filter : progid:DXImageTransform.Microsoft.Matrix ( enabled=bEnabled , SizingMethod=sMethod , FilterType=sType , Dx=fDx , Dy=fDy , M11=fM11 , M12=fM12 , M21=fM21 , M22=fM22 )

Scripting object.style.filter = "progid:DXImageTransform.Microsoft.Matrix ( sProperties ) "

属性:
enabled Enabled 设置或检索滤镜是否激活。 
SizingMethod SizingMethod 设置或检索容器是否改变尺寸去适应目标图像。 
FilterType FilterType 设置或检索定义新内容的像素的方法。 
Dx Dx 设置或检索线性转换的向量增加 X 。 
Dy Dy 设置或检索线性转换的向量增加 Y 。 
M11 M11 设置或检索线性转换的第一行/第一列矩阵输入。 
M12 M12 设置或检索线性转换的第一行/第二列矩阵输入。 
M21 M21 设置或检索线性转换的第二行/第一列矩阵输入。 
M22 M22 设置或检索线性转换的第二行/第二列矩阵输入。 


说明:
使用矩阵变形实现对象内容的改变尺寸、旋转、上下或左右反转。
使用此滤镜可以建立下列效果:

1. 左右反转。将 M11 和 M12 的值取负。 
2. 上下反转。将 M21 和 M22 的值取负。 
3. 改变尺寸。将 M11 和 M12 和 M21 和 M22 的值乘以相同的因数。对象内容尺寸会按比例增大或缩小。
 
使用 padding 属性能够使最终图像边角被剪切的机会降到最小。 

示例:#idDiv{position:absolute; left:140px; height:400; width:400;filter:progid:DXImageTransform.Microsoft.Matrix(enabled='false') ; }
#idDiv{position:absolute; left:140px; height:400; width:400;filter:progid:DXImageTransform.Microsoft.Matrix(M11=1.0, sizingmethod="auto expand"); }

------解决方案--------------------
下面的差不多就是楼主那个效果
<style>
body {background:grey;}
img {border:8px solid white;}
</style>
<img src="http://avatar.profile.csdn.net/A/9/7/2_theforever.jpg"
 style="filter:progid:DXImageTransform.Microsoft.Matrix( SizingMethod='auto expand',FilterType=bilinear,Dx=0,Dy=0, M11=0.9,M12=0.5,M21=-0.5,M22=0.9)">

<img src="http://avatar.profile.csdn.net/noavatar_2.gif"
 style="filter:progid:DXImageTransform.Microsoft.Matrix( SizingMethod='auto expand',FilterType=bilinear,Dx=0.3,Dy=0, M11=0.9,M12=0.2,M21=0.3,M22=0.8)">

<br>
<img src="http://avatar.profile.csdn.net/7/1/1/2_dalmeeme.jpg"
 style="filter:progid:DXImageTransform.Microsoft.Matrix( SizingMethod='auto expand',FilterType=bilinear,Dx=0,Dy=0, M11=0.9,M12=0.5,M21=-0.2,M22=0.9)">

<img src="http://avatar.profile.csdn.net/noavatar_2.gif"
 style="filter:progid:DXImageTransform.Microsoft.Matrix( SizingMethod='auto expand',FilterType=bilinear,Dx=0.3,Dy=0, M11=0.9,M12=0.2,M21=0.3,M22=-0.5)">