[英]Custom style in PrimeNG component
How to add some custom style in this html code: 如何在这个HTML代码中添加一些自定义样式:
<p-tieredMenu #menu [model]="items" [popup]="true"></p-tieredMenu>
I would to change a .ui-menu{}
and something else. 我想改变
.ui-menu{}
和其他东西。 How implement this? 怎么实现这个?
In my case I create a file called prime.css in my assets folder. 在我的例子中,我在assets文件夹中创建了一个名为prime.css的文件。 With the follow code:
使用以下代码:
.ui-menu{
}
And then import in my /src/styles.sass. 然后导入我的/src/styles.sass。
@import './assets/styles/prime.css';
我实现了这个属性的样式 - > [style]="{'width':'auto'}"
您可以添加一个scss文件并将其包含在组件中,并在组件装饰器中提供视图封装:none。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.