如何在calc中使用手写笔变量? [英] How to use a Stylus variable in calc?
本文介绍了如何在calc中使用手写笔变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
In Stylus, how do I use a variable in a calc expression?
例如,以下操作不起作用(arrow-size
是变量):
For example, the following doesn't work (arrow-size
being a variable):
arrow-size = 5px
left calc(50% - arrow-size)
推荐答案
In order to use a Stylus variable inside a calc expression, one must employ the string % operator:
arrow-size = 5px
left "calc(50% - %s)" % arrow-size
这篇关于如何在calc中使用手写笔变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文