【问题标题】:How to set highlight color for p:treeTable如何为 p:treeTable 设置高亮颜色
【发布时间】:2014-10-17 15:17:35
【问题描述】:

有没有办法覆盖 Primefaces 树表突出显示颜色?

无效示例:

tr:hover {
    background: #FF0000;
}
.ui-state-hover {
    background: #FF0000;
}
.ui-widget-content:hover {
    background: #FF0000;
}
.ui-state-highlight {
    background: #FF0000;
}

【问题讨论】:

    标签: css primefaces treetable


    【解决方案1】:

    您是否尝试过使用“!important”?

    tr:hover {
        background: #FF0000!important;
    }
    .ui-state-hover {
        background: #FF0000!important;
    }
    .ui-widget-content:hover {
        background: #FF0000!important;
    }
    .ui-state-highlight {
        background: #FF0000!important;
    }
    

    这将覆盖任何调用相同内容的 CSS,例如自动生成的 css。

    【讨论】:

      【解决方案2】:

      我通过以下方式解决了此类问题:

      tr.ui-state-highlight .ui-widget-content{
          color:white;
      }
      

      也许您可以使用 css 类来最小化受影响元素的数量,但不能使用 shure。 =)

      【讨论】:

        猜你喜欢
        • 2012-03-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-10-24
        • 1970-01-01
        • 2014-10-23
        • 2010-11-19
        • 2017-12-30
        相关资源
        最近更新 更多