作者:mou377 | 来源:互联网 | 2023-01-14 14:46
Iwanttosetawidthinpercentageinscssviacalculation,butitgivesmeerrors..我想通过计算在scss中设置
I want to set a width in percentage in scss via calculation, but it gives me errors..
我想通过计算在scss中设置一个百分比的宽度,但是它给了我错误。
Invalid CSS after "...-width: (4/12)%": expected expression (e.g. 1px, bold), was ";"
无效的CSS后”……-width: (4/12)%": expected expression(例如,1px,粗体),is ";"
I want to do something like
我想做一些类似的事情
$my_width: (4/12)%;
div{
width: $my_width;
}
how do I add the % sign in there?
如何添加%符号?
Same question with px and em
px和em也有同样的问题
2 个解决方案