您的位置:首页 > Web前端 > JQuery

jquery easyui datagrid 更改表格标题,行间距和文字大小

2016-09-28 15:54 971 查看
<div  id="table">
<table id="order"></table>
</div>

$("#order").datagrid({
iconCls : 'icon-edit',
fitColumns:true,//填充
fit : true,//自适应
pageSize : 20,//每页显示的记录条数,默认为10
style : {
padding : '8 8 10 8'
},
singleSelect : true,
method : 'get',
url : '',
onLoadError : function() {
alert("提示信息", "数据信息错误");
return;
},
loadMsg :null,
pagination : true,
rownumbers : true,
title : "",
//sortOrder:'desc',
nowrap:false,
columns : [ [ {
field : 'time',
title : '',
align : 'center',
width : 250,
formatter:
function(value,row,index){
return '<span style="font-size:20px">'+value+'</span>';//改变表格中内容字体的大小
}
}
] ]
});


更改样式如下:

<style>
//更改表格标题文字大小
.datagrid-header span {     font-size: 20px !important; }  .datagrid-header-row {     /* background-color: #e3e3e3; */     /* color: #111 */     Height: 50px; }

//更改表格中单元格行间距
#table .datagrid-btable tr{height: 35px;}

//更改表格标题的行间距
.panel-title {
margin-top: 20px;
margin-bottom: 20px;
font-size: 30px;
color: inherit;
}
</style>


仅供参考..songsong…2016.9.28
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  datagrid easyui