选定的行背景颜色

Jef*_*eff 8 jquery-ui jqgrid

我正在使用带有jquery-ui'smoothness'主题的jqgrid,不幸的是,在这个主题中所选择的行背景颜色太亮了,我正在尝试更改背景颜色以使其更加明显.我已经尝试在css中更改ui-state-highlight(使用!important override),但这不起作用.是否有CSS方法来执行此操作或者可能是jqgrid自定义格式化程序?

Ole*_*leg 18

该类ui-state-highlight使用backgroundCSS属性.因此,一个小技巧是使用background而不是background-color删除背景图像.例如

.ui-state-highlight { background: yellow !important; }
Run Code Online (Sandbox Code Playgroud)

看到这里住.

更新:没有必要使用!important.这足以指定更具体的规则,例如

.ui-jqgrid-btable .ui-state-highlight { background: yellow; }
Run Code Online (Sandbox Code Playgroud)

要么

.ui-jqgrid .ui-state-highlight { background: yellow; }
Run Code Online (Sandbox Code Playgroud)