@mixin opacity($opacity) {
     opacity: $opacity;
     $opacityIE: $opacity * 100;
     filter: alpha(opacity=$opacityIE);
}

.opacitydiv {
     @include opacity(0.5);
}

This outputs:


.opacitydiv {
  opacity: 0.5;
  filter: alpha(opacity=50);
}

Leave a Reply