使用bootstrap table的时候 会经常遇到需要对某一列宽度进行更改,首先想到的肯定是width这个属性,然而并没有用。

 

然后去网上查找,发现有一种说法就是首先设置class,然后在table里使用class属性,如图:

bootstrap table里 对列宽度的改变

然而在实验后发现并没有其效果。

 

最后还是解决了这个问题,这里就把解决的方式记录一下:

首先 在table标签里设置一个属性:style="table-layoutfixed;"

 <table id="xxx" style="table-layout: fixed;"> </table>

然后再colums里就可以使用width了;

bootstrap table里 对列宽度的改变

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-01-13
相关资源
相似解决方案