EasyUI入门3 datagrid部分样式设置(颜色,对齐方式)
2017-07-27 19:32
519 查看
datagrid表头颜色样式
<style> .datagrid-header-row td{background-color:blue;color:#fff} </style>
datagrid对齐方式一
$(function () { $('.datagrid-cell').css("text-align", "center"); //使表头居中 });
datagrid对齐方式二
<table id="dg" class="easyui-datagrid" style="width:100%;height:auto" data-options="rownumbers: true,pagination:true,pageSize:20,striped: true, singleSelect: true, method: 'get' "> <thead> <tr> ... <th data-options="field:'专业名称',align: 'center', halign: 'center'">专业名称</th> <th data-options="field:'请购单版本号',align: 'center', halign: 'center'" style="text-align:center">请购单版本号</th> <th data-options="field:'列出所属包所有项',align: 'center', halign: 'center'">列出所属包所有项</th> <th data-options="field:'按管道材料等级分项',align: 'center', halign: 'center'">按管道材料等级分项</th> </tr> </thead> </table>
其中 align:’center’ 控制内容居中 , halign: ‘center’ 控制标题居中。
相关文章推荐
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- 黄聪:phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- css基础 设置所有h1标签的 文本颜色 对齐方式 边框样式 背景颜色
- css基础 设置所有h1标签的 文本颜色 对齐方式 边框样式 背景颜色
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- PHPExcel-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- PHPExcel-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- phpexcel中文教程-设置表格字体颜色背景样式、数据格式、对齐方式、添加图片、批注、文字块、合并拆分单元格、单元格密码保护
- wpf datagrid 样式怎么设置默认选中行的颜色
- EasyUI入门7 datagrid根据列值设置checkbox的绑定状态
- 设置WPF DataGrid 鼠标移动改变行颜色样式
- easyui 设置dataGrid选中行的背景颜色
- WPF 设置DataGrid 鼠标移动改变行颜色样式
- Flex中如何通过tabStyleName, tabWidth和textAlign样式,设置TabBar控件内文本对齐方式
- android 颜色收集及部分gridview样式设置
- Flex中如何通过selectionColor和selectionDisabledColor样式设置DataGrid的行选中与无效时颜色的例子