bootstrap-table设置height后表头与内容无法对齐的问题

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版本的,可以通过如下设置:

$('#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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值