风格如
<div [style.background-image]="\'url(\' + image + \')\'">Background</div>
<div [style.transform]="rotate(7deg)"
Run Code Online (Sandbox Code Playgroud)
不再添加
我有背景图片网址的问题.我有阵列有图像网址我怎么能在背景图片网址中使用它
<div class="col-lg-3 col-md-3 col-sm-6" *ngFor="let course of courses"><a>
</a><div class="box"><a>
<div class="box-gray aligncenter" [style.backgroundColor]="course.imageUrl" >
</div>
</a><div class="box-bottom"><a >
</a><a >{{course.name}}</a>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)