时间:2021-07-01 10:21:17 帮助过:32人阅读
<table id="example" class="table table-border table-bordered table-bg table-hover table-sort">
<thead>
<tr class="text-c">
<th width="25">
<input type="checkbox" name="checkAll" class="checkall" onclick="checkedClean();">
</th>
<th width="100">名称</th>
<th width="100">说明</th>
<th width="100">类型</th>
<th width="60">是否默认</th>
<th width="20">状态</th>
<th width="100"></th>
</thead>
<tbody>
</tbody>
</table> 
解决方法
#example{
width: 100% !important;
}如果遇到设有横向滚动条时,就固定设置Table宽度
#example{
width: ***px !important;
}
这样就完美解决啦。
以上内容就是jQuery Datatables表头不对齐的解决办法,希望能帮助到大家。
相关推荐:
PHPExcel实现冻结锁定表头的方法介绍
html5中实现table表格中的斜线表头效果的5种做法
关于表头排序的5篇文章推荐
以上就是 Datatables表头不对齐怎么办的详细内容,更多请关注Gxl网其它相关文章!