小贝子
编程
首页
Python
Java
Javascript
SQL
.Net
C++
C#
php
More
搜索
在Angular中使用ngClass或ngStyle动态更改颜色
本文关键字:
动态
ngStyle
颜色
ngClass
Angular
javascript
html
css
angular
typescript
更新时间 :
2023-09-23
英文 :
Change color dynamically using ngClass or ngStyle in Angular
我想知道如何改变颜色点击时,我们有一个类定义在css文件?我们应该使用ngClass还是ngStyle?
提前感谢。
Css文件
.text-color: { color:red; }