// Mixin
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
我们在代码中使用这个mixin时是否需要放置那些括号()?
a.overflow {
.text-overflow();
display: block;
}
答案 0 :(得分:0)
在所有课程中,所有课程都被视为mixins。有和没有括号的区别在于不输出任何CSS。
示例强>
// Less file
.no-output(){
color: red;
}
.output {
color: blue;
}
// Outputs
.output {
color: blue;
}