IE counter-progress (CSS)
I'm reading up on opacity CSS and just grew further contempt for IE. Can anyone shed some light on this counter-progress?
CSS for 50% opacity...
in all browsers except IE: opacity: .5;
in IE 5-7: filter: alpha(opacity=50);
in IE 8: -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
[source]
They suggest in order to have your CSS work with IE the two should be used together:
.opaque {
开发者_高级运维 -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter: alpha(opacity=50);
}
I guess my question is, what is going on?
Microsoft didn't implement native in-browser CSS opacity support until IE9. They did provide a method for CSS to invoke DirectX in Windows and let that system handle such things. Hence filter and -ms-filter. Filter was the original version, but was a completely non-standard CSS property and would cause css to not validate. With IE8 they at least change the property name to use the pseudo-standard dash prefix notation to indicate it's non-standard.
精彩评论