我是 SASS 和编程语言的新手。
.row
{
@include make-row;
}
上面的@include
,是不是等同于sass中的@import
函数?你能解释一下 @include
的功能吗?
最佳答案
@import 导入整个文件,@include 包含一段@mixin 代码。它允许您创建可重用的代码。
@mixin example($color, $style, $weight) {
border: $color, $style, $weight;
width: 100px;
height: 100px
padding: 10px;
}
.box {
@include example(#000, solid, 1px);
}
关于css - @include 在 SASS 中做什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33776660/