简体   繁体   English

样式backgroundColor p文件上传primeNG

[英]Style backgroundColor p-fileUpload primeNG

I work with a application angular 4 and p-fileUpload component. 我使用的是应用程序angular 4和p-fileUpload组件。

I want to change the background-color of component and the color of label text. 我想更改组件的背景颜色和标签文本的颜色。

I try to change the style in a css file but it doesn't work 我尝试更改css文件中的样式,但不起作用

.ui-button.ui-fileupload-choose.ui-widget.ui-state-default.ui-corner-all.ui-button-text-icon-left{
 background-color: #3F51B5 !important;
    border: 3px solid #3F51B5 !important;
    color: #d30e0e !important;
}

However the generated code in html is: 但是,在html中生成的代码是:

<span class="ui-button ui-fileupload-choose ui-widget ui-state-default ui-corner-all ui-button-text-icon-left" ng-reflect-klass="ui-button ui-fileupload-choose" ng-reflect-ng-class="[object Object]">
            <span class="ui-button-icon-left fa fa-plus" ng-reflect-klass="ui-button-icon-left fa" ng-reflect-ng-class="[object Object]"></span>

What the problem ? 有什么问题? Is it possible ? 可能吗 ?

Thanks a lot 非常感谢

考虑将要覆盖的CSS添加到位于项目根目录的global styles.css文件中,而不是组件CSS文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM