Skip to content

Cross Browser Opacity Hack

Last updated on October 19, 2014

Below snippets will set the opacity of the elements and its children.

selector {
   // IE 8
  -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

  // IE 5-7 
  filter: alpha(opacity=50);

   // Mozilla 1.6 and older 
  -moz-opacity: 0.5;

  //Safari 1.x 
  -khtml-opacity: 0.5;

  //latest browsers
  opacity: 0.5;
}
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments