例如:
?不管垂直滾動(dòng)條怎么滾動(dòng)? (藍(lán)色表頭)表頭始終在不動(dòng);
列數(shù)過多時(shí)除了左側(cè)固定的列? 其他列通過水平滾動(dòng)條進(jìn)行滾動(dòng);
<style>
.table-responsive{
width: 100%;
}
</style>
<div class="col-sm-12 select-table table-bordered table-responsive" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
<div class="fakeContainer" >
<table id="bootstrap-table"></table>
</div>
</div>
css:定義最外層div寬度
var options = {
url: prefix + "/getData",
modalName: "xxx",
fixedColumns: true,//是否固定列
fixedNumber:3,//固定幾列
striped:true,
pagination:false,//不分頁
showSearch:false,
showColumns:false,
showToggle:false,
showRefresh:false,
height:700 //加入這個(gè)固定表頭
};
加入height? 固定表頭 上下滾動(dòng)表頭一直在最上方
效果:
文章來源:http://www.zghlxwxcb.cn/news/detail-734758.html
?大功告成?。?!文章來源地址http://www.zghlxwxcb.cn/news/detail-734758.html
到了這里,關(guān)于BootStrap table 左側(cè)固定列,表頭固定 垂直滾動(dòng)條,水平滾動(dòng)條展示在可視化界面的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!