mrblah
mrblah

Reputation: 103667

Why does this css class have 3 different filter settings?

Are these for cross browser reasons?

Hoping someone can explain them to me:

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

Upvotes: 0

Views: 72

Answers (3)

inked
inked

Reputation: 624

Firefox, IE, other browsers require different CSS entries to render alpha blending.

Upvotes: 0

Buggabill
Buggabill

Reputation: 13901

It is for cross-browser compatibility. Take a look over here and here for an explanation.

This is for IE:

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

This will work in pretty much everything else:

opacity:.50;

Upvotes: 1

Pablo
Pablo

Reputation: 1069

Different companies using their own implementation in their browser. CSS3 officially recognizes the 'opacity' property.

Upvotes: 0

Related Questions