我正在使用 Angular 7。对于选项卡,我使用了 Tabset。我想为每个选项卡使用不同的颜色作为背景和悬停效果。
这是代码:
<div class="card-body md-tabs">
<ngb-tabset (tabChange)="fun($event.nextId)">
<ngb-tab id="BasicInfo" style="color: #004d40 !important;">
<ng-template ngbTabTitle class="tab-title tab">
<span style="color: #004d40;font-size: 16px;font-weight: bold;"><i
class="icofont icofont-home"></i> Basic Information</span>
</ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
<ngb-tab style="background-color: red" id="Supplier">
<ng-template ngbTabTitle><span style="color: #e65100;font-size: 16px;font-weight: bold;"><i
class="fa fa-money"></i> Supplier</span></ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
<ngb-tab style="background-color: red" id="Tax">
<ng-template ngbTabTitle><span style="color: #e65100;font-size: 16px;font-weight: bold;"><i
class="fa fa-money"></i> Tax</span></ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
<ngb-tab id="Terms">
<ng-template ngbTabTitle>
<span style="color: #1a237e;font-size: 16px;font-weight: bold;"><i
class="fa fa-book"></i> Terms</span>
</ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
<ngb-tab id="Misc">
<ng-template ngbTabTitle>
<span style="color: #bf360c;font-size: 16px;font-weight: bold;"><i
class="fa fa-file-text"></i> Miscellaneous</span>
</ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
<ngb-tab id="Graph">
<ng-template ngbTabTitle>
<span style="color: #01579b;font-size: 16px;font-weight: bold;">
<i class="fa fa-bar-chart"></i> Graph View
</span>
</ng-template>
<ng-template ngbTabContent>
<div [@fadeInOutTranslate] class="m-t-15">
</div>
</ng-template>
</ngb-tab>
</ngb-tabset>
</div>
有什么办法吗?任何人都可以为此提供帮助吗?