【问题标题】:change header color of jqgrid更改 jqgrid 的标题颜色
【发布时间】:2015-09-14 11:23:25
【问题描述】:

我正在使用 jqgrid。我想更改标题栏的颜色,但我没有这样做。我不知道我在做什么愚蠢的错误。我试过这个,但它没有工作

.ui-th-column, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
    border-bottom: 0 none;
    border-top: 0 none;
    overflow: hidden;
    text-align: center;
    white-space: nowrap;
    background: orange;
}

我也试过.ui-jqgrid .ui-widget-header{background-color: yellow !important;},但也没用。

【问题讨论】:

标签: jquery jqgrid


【解决方案1】:

尝试使用

.ui-jqgrid .ui-widget-header {
    background-color: orange;
    background-image: none
}

它改变了标题栏的背景颜色。要更改列标题的背景颜色,您应该使用例如以下 CSS 规则

.ui-jqgrid .ui-jqgrid-labels th.ui-th-column {
    background-color: orange;
    background-image: none
}

您可以指定background 属性(例如background: orange;),而不是同时设置background-color 和删除背景图像,它同时设置许多属性(background-colorbackground-imagebackground-repeat、@987654330 @, background-position)。

【讨论】:

  • @BranSmith:不客气!如果问题解决了,你应该"accept"回答。
  • 哦,当然。我只是错过了。完成
【解决方案2】:

这样使用

.ui-widget-header {
    border: 1px solid yellow;
    background: none;
    background-color: yellow !important;
}

【讨论】:

  • 我试过了,但也没有用。任何类型的更改都不会影响 jqgrid 。我不知道原因。
  • 我把它放在ui.jqgrid.css文件中。
猜你喜欢
  • 2013-11-19
  • 2014-12-12
  • 1970-01-01
  • 2019-04-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多