问题
I fail to style the text of a PrimeNG TabView.
Here's the Stackblitz showing the problem.
What am I missing?
回答1:
One way to solve your problem is to override PrimeNG class concerning tabview title : ui-tabview-title
.
So something like
.ui-tabview-title {
color: red;
}
should do the trick. Be sure to call that CSS after PrimeNG one.
Edit
You can apply CSS on first tab header with :first-child
property :
ul.ui-tabview-nav li:first-child span {
color: red;
}
See working StackBlitz.
来源:https://stackoverflow.com/questions/53430376/styling-primeng-p-tabview