【问题标题】:Change md-icon and md-button on hover在悬停时更改 md-icon 和 md-button
【发布时间】:2017-08-18 02:29:56
【问题描述】:

当我将鼠标悬停在按钮上时,如何将 md-button 内的 md-icon 与按钮文本更改为相同的颜色。请参阅plunker上的示例

【问题讨论】:

  • 按钮颜色相同的颜色?....你能详细说明一下吗?
  • 当我将鼠标悬停在@Hackerman 上时,我希望md-icon 具有与按钮文本相同的颜色

标签: css angularjs angular-material


【解决方案1】:

将此添加到您的样式中

md-list-item > .md-button:hover > md-icon{
  color:rgb(255, 255, 255);
}

这里是plknr

【讨论】:

  • 这解决了我的问题。谢谢......不幸的是,我没有足够的声誉来投票给你的答案@Jesus Carrasco
  • 很高兴帮助老兄。
【解决方案2】:

以下样式表适合您:

md-list-item > .md-button:hover md-icon svg {
  fill: white;
}

【讨论】:

    猜你喜欢
    • 2019-12-28
    • 2017-02-15
    • 1970-01-01
    • 2019-11-12
    • 1970-01-01
    • 2017-08-04
    • 1970-01-01
    • 2016-05-03
    • 1970-01-01
    相关资源
    最近更新 更多