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

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什么的都是刚装的新版。。求指点


然而 sass 并没有三角函数

https://github.com/adambom/Sa...

【热门文章】
【热门文章】