scss编译出错,貌似是三角函数不太对

刚玩scss,跟着demo练手,然后编译出错了。。
https://jsfiddle.net/ccchangk...

$bubble-d: 4.5rem; // bubble diameter
$bubble-r: .5*$bubble-d; // bubble-radius
$particle-d: .375rem;
$particle-r: .5*$particle-d;

$shadow-list: (); // init shadow list
$n-groups: 7; // number of groups
$group-base-angle: 360deg/$n-groups;
$group-distr-r: $bubble-r; // circular distribution radius for groups

@for $i from 0 to $n-groups {
    // current group angle, starting fron 12 o'clock
    $group-curr-angle: $i * $group-base-angle - 90deg;
    // coords of the central point of current group of particles
    $xg: $group-distr-r * cos($group-curr-angle);
    $yg: $group-distr-r * sin($group-curr-angle);

    // add to shadow list
    $shadow-list: $shadow-list, $xg $yg;
}
Error: Undefined operation: "2.25rem times cos(-90deg)".
        on line 15 of E:\soft\demo\js\css\style.scss
  Use --trace for backtrace.
[Finished in 0.4s]

ruby什么的都是刚装的新版。。求指点
clipboard.png

阅读 4.4k
2 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题