在IE8中继续使用滤镜及IE8的一些CSS扩展属性

Posted on February 20, 2009 by Fdream

很早以前就说过,IE8的标准模式已经不再支持滤镜了,不过IE仍然留了一条后路,你可以在CSS中这样写滤镜:

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)";

当非常遗憾的是,这个属性只有IE8能认识,如果要兼容IE6还有IE7,你必须在这一行的后面继续加上以前的滤镜代码:

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=50)";
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);

注意:这个先后顺序非常重要!这会影响到IE8兼容模式下的显示效果。

官方blog(IE Blog)的关于在IE8中使用滤镜原文在这里

另外,这里还有IE8的私有CSS属性列表

分享 |
Categories:
Ajax Web
Tags:
,
Comments:
Leave a comment
Views:
1,753 Views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>