发布网友
发布时间:2022-04-23 13:04
共2个回答
懂视网
时间:2022-04-23 17:25
<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表头不对齐的解决办法,希望能帮助到大家。
热心网友
时间:2022-04-23 14:33