Multiple Parameters in Less.Js
Can I use multiple parameters in a class? For instance I'd like to give a div both border radius and a background color. How would I do this?
Here is an example of what I am trying to do:
.button (@radius, @color) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius:开发者_C百科 @radius;
background:@color;
}
The correct way is to separate them by commas.
.button (@radius 4px, @color #000) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
background:@color;
}
Don't separate them by semi colons.
精彩评论