Advertisement
keha76

CSS Background Transparency

Mar 18th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.73 KB | None | 0 0
  1. /**
  2.  *
  3.  *    Background Transparency
  4.  *
  5.  *    Firefox 3
  6.  *    Safari 2
  7.  *    Opera 10
  8.  *    IE5.5, IE6, IE7, IE8
  9.  *
  10.  *    IE hexadecimal filter value!
  11.  *    Take our desired alpha level, 0.6, and multiply it with 255,
  12.  *    then convert the result into hex. The first 2 numbers is the
  13.  *    opacity level.
  14.  *
  15. **/
  16. .alpha60 {
  17.    
  18.     /* Fallback for browsers without RGBa support */
  19.     background: rgb( 0, 0, 0 );
  20.    
  21.     /* RGBa with 0.6 opacity */
  22.     background: rgba( 0, 0, 0, 0.6 );
  23.  
  24.     /* IE5.5 -> IE7 */
  25.     filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
  26.    
  27.     /* IE8 */
  28.     -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement