Css 造型肯杜伊组合框
我想为KendoUI项的必填字段和无效字段设置样式(例如,为必填输入设置不同的背景色) 我使用的样式如下:Css 造型肯杜伊组合框,css,validation,styles,kendo-ui,kendo-combobox,Css,Validation,Styles,Kendo Ui,Kendo Combobox,我想为KendoUI项的必填字段和无效字段设置样式(例如,为必填输入设置不同的背景色) 我使用的样式如下: .k-textbox>input[required], .k-picker-wrap .k-input[required], .k-datepicker .k-input[required], .k-dropdown-wrap .k-input[required] { background-color: yellow; } .k-invalid { backgro
.k-textbox>input[required],
.k-picker-wrap .k-input[required],
.k-datepicker .k-input[required],
.k-dropdown-wrap .k-input[required] {
background-color: yellow;
}
.k-invalid {
background-color: pink !important;
}
以下是JSFIDLE:
DatePicker工作正常,但我无法为必需或无效的组合框设置样式。试试这个
.k-input, input.k-textbox, textarea.k-textbox, input.k-textbox:hover, textarea.k-textbox:hover, .k-textbox > input{
background-color: yellow !important;
}
.otherCombo .k-dropdown-wrap .k-input{
background-color: blue !important;
}
演示:它可以工作,但不是我想要的。我使用MVC来构建控件,根据数据注释生成所需的标记。我不能将类放在某些组合上,而不能放在其他组合上(当然,我可以,但当某些字段的规则更改为必需时,将有两个位置需要更改)。另外,还有另一部分,那就是客户端验证。问题是剑道并没有将标记和样式复制到阴影控件(必需的和k-invalid类)中。这在你们的问题中并没有提到。好的,我试试看。