事情经过是这样的:今天某同学用Matrix滤镜实现了IE下的一个旋转效果,但在IE6、7下页面样式全部被搞乱掉,滤镜之后的CSS样式完全没生效。剥离无关代码后类似于这样:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jerry Qu's HTML document</title>
<style type="text/css">
#img {
filter:progid:DXImageTransform.Microsoft.Matrix(M11=-0.707,M12=-0.707,M21=0.707,M22=-0.707,SizingMethod='auto expand');
}
body {color:red;}
</style>
</head>
<body>
<img id="img" src="http://st.imququ.com/uploads/2011/07/ququ_1_1_1.jpg" />这行文字应该是红色的。
</body>
</html> 用IE6或7打开这个页面,可以看到滤镜之后定义的样式没有生效。