Return to Snippet

Revision: 30333
at August 12, 2010 07:12 by viatropos


Initial Code
// css
.opacity {
  opacity: .80;
  filter: alpha(opacity=80);
  -ms-filter: "alpha(opacity=$value)";
  -khtml-opacity: .80;
  -moz-opacity: .80;
}

// sass
@mixin opacity($value) {
  opacity: #{"." + $value};
  filter: alpha(opacity=$value);
  -ms-filter: "alpha(opacity=$value)";
  -khtml-opacity: #{"." + $value};
  -moz-opacity: #{"." + $value};
}

.opacity {
  @include opacity(80);
}

Initial URL
cross-browser-css-opacity-with-and-without-sass-

Initial Description

                                

Initial Title
Cross Browser CSS Opacity (with and without Sass)

Initial Tags
css, html, browser

Initial Language
CSS