スタイルに .css ファイルを使用しています。私のビュー ページには 2 つのリスト ビューがあり、2 つのリスト ビューに 2 つの異なる色が必要です。剣道UIでそれを行うにはどうすればよいですか
よろしく、
スリ
CSS 定義の前に listviewを付けid
て、一方と他方を区別します。
ListViews の HTML が与えられた場合:
<div id="ListView1"></div>
<div id="ListView2"></div>
そして JavaScript:
$("#ListView1").kendoListView({
dataSource: sharedDataSource,
selectable: true,
template: "<li>${title} ${year}</li>"
});
$("#ListView2").kendoListView({
dataSource: sharedDataSource,
selectable: true,
template: "<li>${title} ${year}</li>"
});
CSS 定義は次のようになります。
#ListView1 .k-state-selected {
background: red;
}
#ListView2 .k-state-selected {
background: blue;
}