【发布时间】:2016-10-12 02:52:47
【问题描述】:
我试图让 {{f.percentage}} 的颜色根据百分比来改变。我能够生成 Red Green Blue 值,但我不知道如何使用 ng-style 来编写“color: rgb(red,green,blue)”。谢谢
<div class="winPer" style="float:right;">
<span ng-style="{'color':
'rgb(' + f.red + ',' + f.green + ',' + f.blue + ')'}">{{f.winRate}}%</span>
</div>
【问题讨论】:
-
我编辑了我的原始帖子以解决问题,但它仍然无法正常工作
标签: javascript html angularjs