gpt4 book ai didi

css - 如何更改 MVVM 中网格列的颜色?

转载 作者:太空宇宙 更新时间:2023-11-04 08:33:34 26 4
gpt4 key购买 nike

如何在 MVVM 中更改网格列的颜色?我想要这样的东西:

第一列:绿色

第二列:黄色

<div data-role="grid"
data-toolbar="DOC"
data-columns="[
{ 'field': 'doc1'},
{ 'field': 'doc2' }
]"
data-bind="source: sourceList"></div>

我想要这样的图片:enter image description here

最佳答案

您可以将以下样式添加到您的 CSS 或页面:

#grid th:nth-child(1) {
background: green;
}

#grid th:nth-child(2) {
background: yellow;
}

您需要根据您的设置设置选择器。

关于css - 如何更改 MVVM 中网格列的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44630855/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com