-ms-filter vs filter有什么区别? [英] -ms-filter vs filter What's the difference?
问题描述
IE的过滤器
和 -ms-filter
属性之间有什么区别?如果我使用一个,我应该使用它们?他们做同样的事情,但每一个只工作在某些版本的IE?
What's the difference between between IE's filter
and -ms-filter
properties? If I use one should I use them both? Do they do the same thing, but each work on only certain versions of IE?
推荐答案
Microsoft介绍 -ms-filter
,使Internet Explorer更符合标准(CSS 2.1要求供应商扩展具有供应商前缀)。由于原始过滤器
属性的语法不符合CSS 2.1标准,因此IE8 +需要 -ms-filter
属性的值
Microsoft introduced -ms-filter
to make Internet Explorer more standards-compliant (CSS 2.1 requires vendor extensions to have vendor prefix). As the syntax of original filter
property is not CSS 2.1 compliant, IE8+ requires the value of the -ms-filter
property to be enclosed in quotation marks.
filter: alpha(opacity=40);
-ms-filter: "alpha(opacity=40)";
,就我所知,遗留的
过滤器
属性在所有版本的Internet Explorer中支持向后兼容性。
-ms-filter
is supported in IE8+, legacy filter
property is, as far as I know, for backwards compatibility supported in all versions of Internet Explorer.
相关链接: http://blogs.msdn。 com / b / ie / archive / 2008/09/08 / microsoft-css-vendor-extensions.aspx
请注意,在IE10中移除。
Please note that support for filters may be removed in IE10.
这篇关于-ms-filter vs filter有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!