我想要动态注入一个div的背景图像。我看到图片获取加载正常,但CSS不会改变,div从不会获得背景图像。我究竟做错了角度不工作的css
我有以下代码:
<style>
#container {
width:100%;
}
.left_column {
float:left;
width:37%;
height: 150px;
/*background-color: red;*/
}
.right_column {
float:right;
width: 37%;
height: 150px;
}
.snipe{
float: right;
background-color: red;
color: white;
position: relative;
margin-top: 99%;
}
</style>
<div ng-app="myApp">
<div ng-controller="ShowCtrl">
<div class="content-padded">
<h2>{{zucrew.name}}</h2>
</div>
<div class="topcoat-list__item" hm-tap="open(person.id)"
ng-repeat="person in persons" ng-class-odd="'left_column'" ng-class-even="'right_column'"
ng-style="{'background-image' : 'url({{person.src}})'}">
{{ person.name }}
</div>
</div>
</div>
宾果!像魅力一样工作 – Autolycus