1

Primefacesツリーテーブルのハイライト色をオーバーライドする方法はありますか?

動作しない例:

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

2 に答える 2

0

このタイプの問題を次の方法で解決しました。

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

css-class を使用して、影響を受ける要素の量を最小限に抑えることはできるかもしれませんが、確実ではありません。=)

于 2015-02-06T12:29:03.753 に答える
0

「!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 が上書きされます。

于 2014-10-17T15:28:22.577 に答える