角材质:单击/激活时更改选项卡的背景色 [英] Angular Material: Change Background color of tabs when clicked/active

查看:67
本文介绍了角材质:单击/激活时更改选项卡的背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要删除在有角材质中单击选项卡时应用的背景色效果:

I want to remove the background-color effect applying when clicked on tab in angular material:

这是 md-tabs

当我点击选项卡时,我可以看到背景颜色正在应用于div元素:

When I click on the tab, I can see a background-color is applying to the div element:

这是屏幕截图

我尝试使用以下代码重写样式,但未生效:

I tried to over-ride the style with the following code, but not taking into effect:

.md-ripple-container:active{
    background-color: none; !important
}

帮助!

推荐答案

只需在css中使用.md-tab.md-active类.参见下面的示例.

Just use the .md-tab.md-active class in css. see the below example.

http://codepen.io/next1/pen/JXbVQN

这篇关于角材质:单击/激活时更改选项卡的背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆