I have a dropdownlist when a value is selected and a button is clicked it's get disabled fine but the background-color is not grey like textboxes, I need to make the background-color grey of a dropdownlist when it is disabled in AngularJS . JS
<select class="categories" ng-model="Model.CurrentDowntime.CategoryId" ng-options="downtimeCategory.CategoryId as downtimeCategory.CategoryName for downtimeCategory in Model.DowntimeCategories" ng-disabled="Model.CurrentDowntime.EventId !== undefined" required="" >
<option value="">-------------------SELECT-----------------</option>
</select>
最佳答案
在你的 CSS 中:
select[disabled] {
background-color: #CCC; //use your prefered color here
}
关于html - 在 AngularJS 中禁用下拉列表时如何使背景颜色变为灰色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25421456/