首页 > 解决方案 > How to make table headers non scrollable bootstrap vue

问题描述

I am new to bootstrap vue .I have used bootstrap-vue 1.4 for my whole application used b-table for my table but the table headers also move when scrolled i want to make them sticky or non scrollable i found that with the new bootstrap-vue 2.0 there is an option sticky-header but i cannot use that because i might break my application is there any way to make the headers sticky using bootstrap-vue 1.4

标签: cssvue.jsbootstrap-vue

解决方案


 .table.b-table>thead>tr>th {
  background-color: white;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 2;
} 

这个东西对我有用,在 app.vue 中使用它应该修复所有的 b 表


推荐阅读