【发布时间】:2019-02-01 16:58:56
【问题描述】:
我是 sass 新手,目前正在探索它。我想尝试使用 mixin,但是当我尝试它时,它就是行不通。代码如下:
@mixin container($radius, $width, $height, $bg, $color) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
$width: $width;
$height: $height;
$bg: $bg;
$color: $color;
margin: 0 auto;
}
.container {
@include container(10px, 80%, 700px, $white, $dark-grey)
}
所以我有一个 div 和 class 容器,想把 mixin 放在那里,但它就是不工作。有人可以帮忙吗??
【问题讨论】:
标签: sass scss-mixins