1
//Usage
@include border-radius(150px / 70px); 

//Mixin
@mixin border-radius($values) {
  -webkit-border-radius: $values;
  -moz-border-radius: $values;
  border-radius: $values;
}

結果は次のようになります。

border-radius: the division of 150/70, which is 2.xxxxx-something

同じ mixin 内でこれをどのように修正できますか?

4

1 に答える 1

2

ここで文字列補間を使用する必要があります。

.foo {
  @include border-radius(#{150px} / 70px);
}
于 2013-07-12T14:40:46.523 に答える