2014-10-17 104 views
0

有没有办法来覆盖Primefaces treetable突出显示颜色?如何设置p:treeTable的突出显示颜色

不工作的例子:

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

回答

0

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

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。

+0

是的,我试过,但它仍然无法正常工作。 – Silence 2014-10-17 15:32:59

0

我解决了这类问题:

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

也许你可以使用一个CSS类,以尽量减少影响的元素的含量,而不是舒尔。 =)

相关问题