here is the snapshot. 我在gridster单元中添加图像时遇到问题。我正在使用AngularJS v1.5.x。
Gridster的CSS
.showImage {
display: block;
background: url("../assets1/images/avatars/profile.jpg");
background-repeat: no-repeat;
background-position: center;
}
gridster的HTML
<div class="columns" ng-style="{height: $ctrl.columnsHeight + 'px'}">
<div class="column showImage" ng-repeat="column in $ctrl.columns"
ng-style="{'min-width': $ctrl.width + 'px', 'margin-left': ($first && !$ctrl.gridster.$options.outerMargin ? 0 : $ctrl.margin) + 'px'}">
</div>
</div>
<div class="rows" ng-style="{width: $ctrl.rowsWidth + 'px'}">
<div class="row showImage" ng-repeat="row in $ctrl.rows"
ng-style="{height: $ctrl.height + 'px', 'margin-top': ($first && !$ctrl.gridster.$options.outerMargin ? 0 :$ctrl.margin) + 'px'}">
</div>
</div>