jessyhoule

CSS / Opacity

Jun 25th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.61 KB | None | 0 0
  1. .transparent {
  2.     /* Required for IE 5, 6, 7 */
  3.     /* ...or something to trigger hasLayout, like zoom: 1; */
  4.     width: 100%;
  5.  
  6.     /* Theoretically for IE 8 & 9 (more valid) */
  7.     /* ...but not required as filter works too */
  8.     /* should come BEFORE filter */
  9.     -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
  10.  
  11.     /* This works in IE 8 & 9 too */
  12.     /* ... but also 5, 6, 7 */
  13.     filter: alpha(opacity=50);
  14.  
  15.     /* Older than Firefox 0.9 */
  16.     -moz-opacity:0.5;
  17.  
  18.     /* Safari 1.x (pre WebKit!) */
  19.     -khtml-opacity: 0.5;
  20.  
  21.     /* Modern!
  22.     /* Firefox 0.9+, Safari 2?, Chrome any?
  23.     /* Opera 9+, IE 9+ */
  24.     opacity: 0.5;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment