【发布时间】:2016-10-31 23:48:55
【问题描述】:
In this plunk 我有一个允许多个条目的 ui-select。我将border 颜色更改为蓝色,并尝试在ui-select 使用.font-control:focus 获得焦点时将颜色更改为红色,但这不起作用。有什么想法吗?
HTML
<style>
.form-control {
border-color: blue;
}
.form-control:focus {
border-color: red;
}
</style>
<br/><br/>
<ui-select multiple tagging tagging-label="(custom 'new' label)"
ng-model="multipleDemo.colors" sortable="true"
style="width: 300px;" title="Choose a color">
<ui-select-match placeholder="Select colors...">{{$item}}</ui-select-match>
<ui-select-choices repeat="color in availableColors | filter:$select.search">
{{color}}
</ui-select-choices>
</ui-select>
Javascript:
var app = angular.module('demo', ['ngSanitize', 'ui.select']);
app.controller('ctl', function ($scope) {
$scope.availableColors = ['Red','Green','Blue','Yellow','Magenta',
'Maroon','Umbra','Turquoise'];
$scope.multipleDemo = {};
$scope.multipleDemo.colors = ['Blue','Red'];
});
【问题讨论】:
标签: angularjs ui-select angular-ui-select