Cross-Browser Opacity


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. /*
  2.  * Andrew Wayne 2010
  3.  * Cross-Browser Opacity
  4. */
  5.  
  6. .opacity {
  7.  
  8. -moz-opacity: 0.5; /* Netscape */
  9.  
  10. -khtml-opacity: 0.5; /* Safari 1.x */
  11.  
  12. -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 8 */
  13.  
  14. filter: alpha(opacity=50); /* IE 5-7 grrr */
  15.  
  16. opacity: 0.5; /* The rest, good browsers :) */
  17. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.