如何更改Jqgrid中的标题和行的背景?
答
// 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
答
//for changing colour of titlebar
#list .ui-jqgrid-titlebar {
background:blue;
}
//for changing header
.ui-jqgrid .ui-jqgrid-htable th{
background: blue
}
你能不能给我们一些更多的信息,请? 像:你正试图改变的HTML代码,适用于你想改变的作品的CSS代码。 – 2012-02-13 07:33:53