Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何访问primefaces数据表行css?_Primefaces_Themes_Skinning - Fatal编程技术网

如何访问primefaces数据表行css?

如何访问primefaces数据表行css?,primefaces,themes,skinning,Primefaces,Themes,Skinning,如何访问多个彩色行的行css 我尝试使用: .redRow .ui-datatable-even, ui-datatable-odd { background-color: red; } .blueRow .ui-datable-even, ui-datatable-odd{ background-color: blue; } 但它不起作用,因为primefaces主题覆盖了这一点。怎么做这样的事 确保在primefaces css之后加载css,如中所示。在组件中包括封装:vi

如何访问多个彩色行的行css

我尝试使用:

.redRow .ui-datatable-even, ui-datatable-odd {
   background-color: red;
}

.blueRow .ui-datable-even, ui-datatable-odd{
   background-color: blue;
}

但它不起作用,因为primefaces主题覆盖了这一点。怎么做这样的事

确保在primefaces css之后加载css,如中所示。

在组件中包括封装:viewEn封装。无可使用css选择器访问数据表中的元素

import { Component, OnInit, ViewEncapsulation } from '@angular/core';

@Component({
    selector: 'my-component',
    templateUrl: './my-component.component.html',
    styleUrls: ['./my-component.component.css'],
    encapsulation: ViewEncapsulation.None
})

我也试过了,但不起作用。。似乎主题覆盖了所有…发布你的xhtml代码。Q是关于素数的,你的答案是关于角度的?与光明无关!我的错。不删除我对同时使用Angular和PrimeFaces的人的回答:)但是,我仍然不知道这是如何解决PrimeFaces组件css的一个非常不可能的组合。我在使用Angular 2时遇到了这种问题。正如OP所说,primefaces主题覆盖了css上的样式。这解决了我的问题。如果这不太可能被认为是这个问题的解决方案,请告诉我,我将删除我的答案。谢谢,干杯!