更改Kendo dropdownlist angular 6的默认背景颜色

时间:2019-02-26 06:24:19

标签: angular

我想在Kendo下拉列表中更改默认颜色(灰色),有人可以帮我怎么做吗?

app.html

<kendo-dropdownlist
    #list
    [data]="data"
    [filterable]="true"
    textField="text"
    valueField="value"
    (filterChange)="handleFilter($event)" 
    (selectionChange)="Change($event)"
    [valuePrimitive]="true"
    formControlName = selectSize
>
</kendo-dropdownlist>

app.component.ts

export class AppComponent {
@ViewChild("list") list;

public source: Array<{ text: string, value: number }> = [
    { text: "Small", value: 1 },
    { text: "Medium", value: 2 },
    { text: "Large", value: 3 }
];

Trying to change the grey color of dropdown list[1]

1 个答案:

答案 0 :(得分:1)

要更改下拉列表的颜色,您需要覆盖kendo dropdownlist类,如下所示:

style.css

.k-dropdown-wrap>.k-input, .k-dropdown .k-dropdown-wrap .k-select, .k-list, .k-reset {
    background-color: lightblue;
}

Here is solution on stackblitz