gpt4 book ai didi

c# - 如何在 SlickGrid 中的特定行上设置行背景颜色

转载 作者:行者123 更新时间:2023-11-28 08:48:27 25 4
gpt4 key购买 nike

我想将 SlickGrid 中的前 3 行颜色设置为蓝色。我想知道这样做的简单方法。

我尝试了以下代码,但它不起作用:

data.getItemMetadata = function (index)
{
if (index == 0 || index == 1 || index == 2)
{
return {cssClasses: "BlueColor"};
}
}

最佳答案

您可以使用以下 CSS:

.slick-row:nth-child(-n+3){
/*BlueColor class contents, if you place it before the .even and .odd classes you will need :important*/
}

关于c# - 如何在 SlickGrid 中的特定行上设置行背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19454187/

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