Posted By

c4ptivate on 05/27/10


Tagged

opacity


Versions (?)

CSS2 - opacity


 / Published in: CSS
 

URL: http://www.quirksmode.org/css/opacity.html

IE compatibility note

If you want opacity to work in all IE versions, use opaque4 class

  1. .test {
  2. background-color: #6374AB;
  3. width: 100%;
  4. color: #ffffff;
  5. }
  6.  
  7. .opaque1 { /* for all other browsers */
  8. opacity: .5;
  9. }
  10.  
  11. .opaque2 { /* for IE5-7 */
  12. filter: alpha(opacity=50);
  13. }
  14.  
  15. .opaque3 { /* for IE8 */
  16. -ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\";
  17. }
  18.  
  19.  
  20. .opaque4 {
  21. -ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\"; /* first!*/
  22. filter: alpha(opacity=50); /* second!*/
  23. }

Report this snippet  

You need to login to post a comment.