LESS CSS class for cross browser opacity

This’ll allow you to specify an opacity value (between 0 and 1) and have LESS automatically add in the necessary IE filters, converting it to an IE opacity value (between 0 and 100).

One thought on “LESS CSS class for cross browser opacity

  1. I think it should be like that:

    -ms-filter: ~'"progid:DXImageTransform.Microsoft.Alpha(Opacity=@{ieOpacity})"';

    (there’s another ‘ ‘ around attribute value)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>