/ Published in: CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// 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); }
URL: cross-browser-css-opacity-with-and-without-sass-