bootstrap-table设置height后表头与内容无法对齐的问题
2017-09-12 09:32
791 查看
bootstrap-table项目官网:https://github.com/wenzhixin/bootstrap-table
bootstrap-table各版本下载:https://github.com/wenzhixin/bootstrap-table/releases
bootstrap-table API文档:http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/
表头对不齐效果如下:
解决方法如下:
1、升级到最高版本,比如现在是1.11.1的(方法最快,什么都不用改)。
2、去掉height的设置。
3、如果是1.9.1版本的,可以通过如下设置:
但实质效果不大,可能还是无法达到效果。尤其是在1.9.0版本上用这个方法是无效的。
4、通过修改源码的形式,这个方式不可取,不然会出现各种问题,比如表头不固定等。
参考:
http://blog.csdn.net/xinshijimanon/article/details/53907404
http://blog.csdn.net/u013630349/article/details/53113191
http://tieba.baidu.com/p/4865094716
http://www.cnblogs.com/weichangyu/p/6269265.html
http://blog.csdn.net/u013451157/article/details/68983349
https://segmentfault.com/q/1010000009406117
http://www.cnblogs.com/hz-cww/p/6294909.html
https://segmentfault.com/q/1010000009406117/a-1020000009413009
http://blog.csdn.net/zhangzhida163/article/details/68928001
bootstrap-table各版本下载:https://github.com/wenzhixin/bootstrap-table/releases
bootstrap-table API文档:http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/
表头对不齐效果如下:
解决方法如下:
1、升级到最高版本,比如现在是1.11.1的(方法最快,什么都不用改)。
2、去掉height的设置。
3、如果是1.9.1版本的,可以通过如下设置:
$('#tableId').bootstrapTable(); // init via javascript $(window).resize(function () { $('#tableId').bootstrapTable('resetView'); });
但实质效果不大,可能还是无法达到效果。尤其是在1.9.0版本上用这个方法是无效的。
4、通过修改源码的形式,这个方式不可取,不然会出现各种问题,比如表头不固定等。
参考:
http://blog.csdn.net/xinshijimanon/article/details/53907404
http://blog.csdn.net/u013630349/article/details/53113191
http://tieba.baidu.com/p/4865094716
http://www.cnblogs.com/weichangyu/p/6269265.html
http://blog.csdn.net/u013451157/article/details/68983349
https://segmentfault.com/q/1010000009406117
http://www.cnblogs.com/hz-cww/p/6294909.html
https://segmentfault.com/q/1010000009406117/a-1020000009413009
http://blog.csdn.net/zhangzhida163/article/details/68928001
相关文章推荐
- bootstrap-table设置height后表头与内容无法对齐的问题
- bootstrap-table 表头或组合表头,和内容无法对齐的问题
- BootStrap Table 设置height表头与内容无法对齐的问题
- bootstrap-table 表头,和内容对齐问题
- 解决BootstrapTable设置height属性后,表格不对齐的问题
- bootstrap-table 表头,和内容对齐问题
- 如何解决BootstrapTable中表头和内容不对齐问题
- BootStrapTable.js 表头与内容无法对齐
- bootstrap-table表头固定,表内容不对齐的问题
- Bootstrap table使用心得---thead与td无法对齐的问题
- bootstrap-table 插件 表头与内容不对齐 解决方式
- bootstrap-table表头固定,表内容不对齐的另类解决方法
- jqgraid table 表头与内容cell无法对齐 解决方案
- bootstrap table 修改table内容时设置表头与表格对齐
- 解决boostrap-table有水平和垂直滚动条时,滚动条滑到最右边表格标题和内容单元格无法对齐的问题
- Asp.Net服务器发送HTTP标头后无法设置内容类型的问题解决
- bootstrap-table 表头和内容对不齐解决办法
- bootstrap-table 表头和内容宽度不一致解决办法
- 解决 ie 下 javascript 设置 table.tBodies.innerHTML 无法设置的问题
- 解决设置table-layout:fixed后无法设置宽度的问题