Reputation: 561
Hi, I am using Ionic to develop a mobile app. I used Ionic tabs template. On the bottom of the screen, the background of tab is still white. I don't know how to change the background. I am only change the color of the icon with the following code. How can I change the background tab color.
<ion-tabs class="tabs-icon-top tabs-color-{{theme.primary}}" >
<ion-tab title="Cards" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse-strong" href="#/tab/dash">
<ion-nav-view name="tab-dash">
</ion-nav-view>
</ion-tab>
</ion-tabs>
Upvotes: 0
Views: 2181
Reputation: 45
ion-tab-bar, ion-tab-button{
background-color: #320d99;
color: #fff;
}
ion-icon{
color: #ffffff;
}
it works...
Upvotes: 0
Reputation: 1419
Had a similar issue, getting rid of color
in tabs-color-royal
along with options already provided by Aman did the trick!
<ion-tabs class="tabs-icon-top tabs-{{theme.primary}}">
<ion-tab title="Cards" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse-strong" href="#/tab/dash">
<ion-nav-view name="tab-dash">
</ion-nav-view>
</ion-tab>
</ion-tabs>
Options:
Upvotes: 0
Reputation: 21
I have the same problem and I did not get any solution that worked.
My home solution in app.scss:
.tabbar {
background: red !important;
color: #bbb !important;
& .tab-button {
color: #bbb !important;
& .tab-button-icon {
color: #bbb !important;
}
}
& .tab-button[aria-selected=true]{
// text-shadow: 1px 0px #eaeaea;
color: white !important;
& .tab-button-icon {
text-shadow: 1px 0px #eaeaea;
color: white !important;
}
}
}
Upvotes: 2
Reputation: 45
you can add other ionic color class too such as -
Just replace "tabs-background-positive" with above options.
Upvotes: 0
Reputation: 315
you need to add tabs-background-positive
class
<ion-tabs class="tabs-icon-top tabs-color-{{theme.primary}} tabs-background-positive" >
<ion-tab title="Cards" icon-off="ion-ios-pulse" icon-on="ion-ios-pulse-strong" href="#/tab/dash">
<ion-nav-view name="tab-dash">
</ion-nav-view>
</ion-tab>
</ion-tabs>
Upvotes: 0