@H_301_1@参见英文答案 >
Math with interpolated variables?1
我需要在我的SCSS代码中定义一个宽度:
我需要在我的SCSS代码中定义一个宽度:
#example { width: $currentWidth + 349 !important; }
其中$currentWidth由循环定义.
然而,Sass总是最终连接两个数字,而不是进行算术.
我也试过:
width:#{$currentWidth 349} px!important;
这仍然导致连接.
我想知道我在做错什么?我知道这是非常基本的,但是我似乎还没有找到关于Sass如何处理算术的好信息