1
私は以下のhtmlとcssを持っていますが、私は静的クラスを設定したのと同じ方法で{{item.color}}の後に.tooltip:を設定する必要があります。 ngstyle。pseduo cssのngclass/ngstyleを設定する方法
<div class="tooltip" ng-style="{ 'background' : item.color}" ng-class="{ 'after': border-top: solid item.color 10px;}"</div></a>
.time-of-year .tooltip:before {
bottom: -22px;
content: " ";
display: block;
height: 20px;
left: 85px;
position: absolute;
border-color: #a9a9a9 transparent transparent transparent;
border-style: solid;
border-width: 11px;
}
/* Yellow triangle */
.time-of-year .tooltip:after {
border-left: solid transparent 10px;
border-right: solid transparent 10px;
border-top: solid #fff 10px;
bottom: -10px;
content: " ";
height: 0;
left: 99px;
margin-left: -13px;
position: absolute;
width: 0;
}
それは人々からより多くの助けを得るために、有利になるだろうのでplunkr /フィドルを追加します。.. –