How to solve the dislocation caused by the fixing of Bootstrap-table meter head
This article mainly introduces "how to solve the dislocation caused by the fixed Bootstrap-table header". In the daily operation, I believe that many people have doubts about how to solve the problem caused by the fixed Bootstrap-table header. The editor consulted all kinds of data and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubt of "how to solve the dislocation caused by the fixed Bootstrap-table header". Next, please follow the editor to study!
Encounter problems
Although the front end is now dominated by the three major frameworks of VAR, there are still many projects that are using JQuery+Bootstrap. For example, the framework I'm in charge of now...
The situation is that the product wants to achieve the effect of scrolling the page down and fixing the header when the header reaches the top. When I saw this requirement, my mood was: Oh,so easy! ^ _ ^ Y
But when I actually realized the fixed meter head, I found that the meter head was crooked?!
Google for a moment
How does Bootstrap-table fix the header?
$('# table'). BootstrapTable ('destroy'). BootstrapTable ({columns: columns, data: data, pagination: true, pageSize: 25, pageNumber: 1, / / initialize load the first page Default first page pageSize: 25, / / number of rows per page (*) pageList: [10,25,50,100], / / number of rows per page (*) fixedColumns: false, / / fixed column fixedNumber: 0, / / fixed number of columns height: 800, / /