Is there a way to set different background colors for different tabs in md-tabs
?
The default is no color as can be seen in tabs demo
I tried <md-tabs background-color="green">
but it's not working
AngularJS Material design (md) tabs, md-tabs
background color is transparent and uses the background color of your main container. Try to add CSS class for md-tabs
.
Added background to entire md-tabs
md-tabs {
background: red;
border: 1px solid #e1e1e1; }
By adding CSS childs to md-tab class, you can see different colors for different tabs.
.md-tab:first-child{background: green; }
.md-tab:nth-child(2){background: pink; }
.md-tab:nth-child(3){background: blue; }
fiddle https://jsfiddle.net/cxf3otz9/
codepen http://codepen.io/anon/pen/zGNEyw
Upon evaluating source code, i came to there a way to achieve dynamic content formatting for tab titles. To get that, please write the code as below
<md-tabs>
<md-tab>
<md-tab-label>
<span ng-class="......">
Title
</span>
</md-tab-label>
<md-tab-body>
content
</md-tab-body>
</md-tab>
</md-tabs>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With