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...
这篇关于scss编译出错,貌似是三角函数不太对的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文