【问题标题】:How to change row background color in SlickGrid如何在 SlickGrid 中更改行背景颜色
【发布时间】:2014-04-24 16:22:41
【问题描述】:

我在 slickgrid 中开始了一个新项目。

I am working this sample.

如何更改我想要的行的背景颜色? 例如:第一行背景色为红色,第二行背景色为蓝色... 谢谢你的帮助。

【问题讨论】:

  • 最好在问题中发布您的代码,而不是给我们一个链接。

标签: slickgrid


【解决方案1】:

如果您总是希望第一行为红色,第二行为蓝色等,则使用 nth-of-type 选择器和 .slick-row 类选择器在 css 中定义它:

/*Colour the first row red*/
.slick-row:nth-of-type(1){
background: #FF0000;
}

/*Colour the second row blue*/
.slick-row:nth-of-type(2){
background: #0000FF;
}

【讨论】:

    猜你喜欢
    • 2011-08-04
    • 1970-01-01
    • 2013-11-22
    • 1970-01-01
    • 2021-12-30
    • 2012-10-31
    • 2013-01-09
    • 2011-11-11
    • 1970-01-01
    相关资源
    最近更新 更多