2012-02-13 66 views
0

我需要更改標題的背景以及Jquery網格的行。我試圖改變幾個CSS類,但我沒有得到我想要的結果。如何更改Jqgrid中的標題和行的背景?

+0

你能不能給我們一些更多的信息,請? 像:你正試圖改變的HTML代碼,適用於你想改變的作品的CSS代碼。 – 2012-02-13 07:33:53

回答

1
// this changes the background image of the header 
.ui-jqgrid .ui-widget-header{ 
    background-image: url(myBackground.jpg) repeat-x !important; 
} 

// this changes the background color of every row in a jqgrid 
.ui-jqgrid tr.jqgrow { 
    background-color: yellow !important; 
} 

注:!important可能沒有必要。

另外請確保您的css文件已加載之後 jqgrid的css文件!

<link rel="stylesheet" type="text/css" media="screen" href="ui.jqgrid.css" /> 
<!-- load jqgrid css first then your css --> 
<link rel="stylesheet" type="text/css" media="screen" href="mystyle.css" /> 
+0

試圖使用這個...它的工作行,但不是頭...我們如何改變標題? – msbyuva 2013-06-27 06:15:09

0
//for changing colour of titlebar 
#list .ui-jqgrid-titlebar { 
background:blue; 
} 
//for changing header 
.ui-jqgrid .ui-jqgrid-htable th{ 
background: blue 
}