I want to use different color combinations of background-color
on different tabs selection.
For example:
- about: red
.nav-tabs
, dark red for.active
, - services: yellow
.nav-tabs
, dark yellow for.active
, - ....
- ....
and so on.
So what would be the best practice to achive this? I have a plan:
- Pre-define styles for background colors,
- Get the hash on
'shown.bs.tab'
event, - Pass it into a
switch
statement, - Set
.nav-tabs
and.active
css.
Any better, a more practical idea?
EDIT:
To be more clear, what I am expecting is if I select about
tab, the whole tab panel and other pills will be red and active about
pill will be dark red. If I select services
, tab panel and all pills will be yellow and active services
pill will be dark yellow.