angular-样式
Style
一、通过 ngStyle
1 ngStyle演示
2
3 ngStyle演示
4 // tempColor定义在ts文件中,数据类型为字符串,值为color的属性值
二、[style.属性]="bool"
"true">test
Class
一、通过ngClass
1
2 ngClass演示
3
4
5
6
7 -
8 {{i}}-------{{item}}
9
10
二、[class.类]='bool'
test