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

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

问题描述

我想删除在角材料中单击选项卡时应用的背景颜色效果:

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天全站免登陆