How to pass a parameter to a CSS class using LESS?
问题 Not sure if this is possible using LESS, but I saw .rotate(@degrees) {...} (is that only work in LESS) I want to be able to write one CSS class and pass the number as a parameter from the HTML - for example: <div class="opacity(20)"> Here is just an example of a repeated CSS class that I use (but even passing an integer will be great): .opacity-10 { opacity: 0.1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=10)"; // IE 8 filter: alpha(opacity=10); // IE 5-7 -moz-opacity: 0.1;