天天看點

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

參數即可!!!

繼續閱讀