天天看点

bootstrap-table 插件 表头与内容不对齐 解决方式

问题如图:

bootstrap-table 插件 表头与内容不对齐 解决方式

问题html:

<div id="queryCustomerTable"></div>
           

出现这个问题,主要是因为在html中,写的是div,而不是table 所造成的!!

解决方式:

<div></div>

,改为

<table></table>

即可!

解决后的html:

<table id="queryCustomerTable"></table>
           

解决后的图片:

bootstrap-table 插件 表头与内容不对齐 解决方式

PS:设置 Height 也木有事情哦~~

备注:

经测试发现,如果是因为:表头下面的内容过多,或者 表格的列过多,引起的 表头 和 内容 不对齐时,仅需要 注释掉

height

参数即可!!!

继续阅读