-ms-filter 与 filter 有什么区别? [英] -ms-filter vs filter What's the difference?

查看:34
本文介绍了-ms-filter 与 filter 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE 的 filter-ms-filter 属性之间有什么区别?如果我使用一个,我应该同时使用它们吗?他们做同样的事情,但每个人都只在某些版本的 IE 上工作吗?

解决方案

Microsoft 引入了 -ms-filter 以使 Internet Explorer 更加符合标准(CSS 2.1 要求供应商扩展具有供应商前缀).由于原始 filter 属性的语法不符合 CSS 2.1,IE8+ 要求将 -ms-filter 属性的值括在引号中.

filter: alpha(opacity=40);-ms-filter: "alpha(opacity=40)";

IE8+ 支持

-ms-filter,据我所知,旧的 filter 属性是为了向后兼容所有版本的 Internet Explorer.>

相关链接:http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx

请注意,IE10 中可能会移除对过滤器的支持.

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 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)";

-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.

Related link: http://blogs.msdn.com/b/ie/archive/2008/09/08/microsoft-css-vendor-extensions.aspx

Please note that support for filters may be removed in IE10.

这篇关于-ms-filter 与 filter 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆