2

Do I really need to use -ms-filter CSS Opacity Properties? I want to run opacity for ie7 to ie11 browser and i used below mentioned css. I got to know that filter works for ie5-ie8 and -ms-filter is only for ie8. if both works for ie8 than what is the purpose of using -ms-filter.

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /*Internet Explorer 8 */
filter: alpha(opacity=50); /*Internet Explorer 5, 6, 7, 8 */
opacity: 0.5; /* Modern browsers */
Praveen
  • 1,772
  • 3
  • 24
  • 42

1 Answers1

1

The MSDN says that:

Sets or retrieves the filter or collection of filters that are applied to the object.

[....]

The -ms-filter attribute is an extension to CSS, and can be used as a synonym for filter in IE8 Standards mode. When you use -ms-filter, enclose the progid in single quotes (') or double quotes ("). Use commas (,) to separate multiple values, as shown in the Examples section.

The -ms-filter is supported in IE8+. It is added to make IE more standard complaint. Also check Microsoft CSS Vendor Extensions

Community
  • 1
  • 1
Rahul Tripathi
  • 168,305
  • 31
  • 280
  • 331