Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试设计一个进度条,并且我想尝试根据一些数学计算来设置进度条的宽度。
下面工作正常,因为我将宽度硬编码为 60%
.pledged(style="width:60%")
我想做这样的事情:
.pledged(style="width:((totalVotes - votesRemaining)*100)%")
我想要达到的目标有可能吗?
请务必添加#{}以访问您的变量:
#{}
.pledged(style="width:#{totalVotes - votesRemaining)*100}%")