通过theadClasses属性设置表头样式。

thead-light设置灰色背景

//bootstrap table初始化数据  itxst.com
$('#table').bootstrapTable({
columns: columns,
data: getData(),
theadClasses: "thead-light",//这里设置表头样式
classes: "table table-bordered table-striped table-sm table-dark",
height:400
}); 

thead-dark设置黑色背景

//bootstrap table初始化数据
$('#table').bootstrapTable({
columns: columns,
data: getData(),
theadClasses: "thead-dark",//这里设置表头样式
classes: "table table-bordered table-striped table-sm table-dark",
height:400
});

自定义一个蓝色的表头样式

<style>
/*定义类名为.thead-blue的样式*/
.table .thead-blue th {
color: #fff;
background-color: #3195f1;
border-color: #0d7adf;
}
</style>
//bootstrap table初始化数据
$('#table').bootstrapTable({
columns: columns,
data: getData(),
theadClasses: "thead-blue",//设置thead-blue为表头样式
classes: "table table-bordered table-striped table-sm table-dark",
height:400
});  

转载:http://www.itxst.com/Bootstrap-Table/

theadClasses设置Bootstrap Table表头样式的更多相关文章

  1. rowStyle设置Bootstrap Table行样式

    日常开发中我们通常会用到隔行变色来美化表格,也会根据每行的数据显示特定的背景颜色,如果库存低于100的行显示红色背景 CSS样式 <style> .bg-blue { background ...

  2. bootstrap table的样式

    <style> table{ border: 1px solid #ddd; background-color: transparent; border-spacing:; border- ...

  3. Bootstrap Table的例子(转载)

    转载自:http://wenzhixin.net.cn/p/bootstrap-table/docs/examples.html#classes-table 使用的API: data1.json da ...

  4. bootStrap table 和 JS 开发过程中遇到问题汇总

    1..bootStrap-table表头固定 在table定义的时候给高度属性就可以自动生成滚动条,并且固定表头[height: 220,] 2.为动态生成的DOM元素绑定事件 on("cl ...

  5. bootstrap table使用小记

    bootstrap table是一个非常不错的,基于bootstrap的插件,它扩展和丰富了bootstrap表格的操作,如格式化表格,表格选择器,表格工具栏,分页等等. 最近基于bootstrap开 ...

  6. bootstrap table 超链接的添加 <a>标签

    后台管理页面采用 bootstrap table 页面样式: 现在需要在操作中添加一个<a>标签,跳转到不同的页面 { title: '操作', align: 'center', form ...

  7. bootstrap table 保留翻页选中数据

    $(function () { $('#exampleTable').on('uncheck.bs.table check.bs.table check-all.bs.table uncheck-al ...

  8. Bootstrap Table踩坑——设置多级表头后只显示第一级表头问题解决办法

    今天设置了Bootstrap Table的复杂表头,设置了多级表头(两行列名),但是只能显示第一级表头(第一行的列名),第二级的表头被第一级的表头覆盖.但是我仿照其他网上的其他设置复杂表头例子都能正常 ...

  9. 给bootstrap table设置行列单元格样式

    1.根据单元格或者行内其他单元格的内容,给该单元格设置一定的css样式 columns: [{ field: 'index', title: '序号', align:"center" ...

随机推荐

  1. ubuntu上安装nodejs和npm

    在使用npm时,特别注意nodejs的版本问题. 一般选择源码安装

  2. 如何制作可以在 MaxCompute 上使用的 crcmod

    之前我们介绍过在 PyODPS DataFrame 中使用三方包.对于二进制包而言,MaxCompute 要求使用包名包含 cp27-cp27m 的 Wheel 包.但对于部分长时间未更新的包,例如 ...

  3. Hdu 1150

    Machine Schedule Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  4. golang数组 排序和查找

    package main import "fmt" func BubbleSort(arr *[5]int){ fmt.Println("排序前arr=",(* ...

  5. 第二周<线性回归>

    可行性分析 略 sklearn.linear_model.linear_regression() 一些参数 fit_intercept 布尔型参数,表示是否计算该模型的截距 normalize 布尔型 ...

  6. c++进制数转换

    QString result; ]; sprintf(buffer, "0x%x", modelId); return result = buffer;

  7. Directx11教程(56) 建立一个skydome

    原文:Directx11教程(56) 建立一个skydome       本章建立一个skydome(天空穹),主要学习如何使用cube mapping.      cube map就是把六张纹理当作 ...

  8. js日历

    html部分 <div class="div"> <p><span onclick="syn()">上一年</span ...

  9. js赋值符号“=”的小例子

    var obj1={x:5}; var obj2=obj1; obj1.a=obj1={x:6}; console.log(obj1.a); console.log(obj2.a); 为什么obj1. ...

  10. 中国境内PE\VC\投资公司名单

    中国境内PE\VC\投资公司名单 1.青云创投 2.高盛 3.红杉资本 4.鼎晖创投 5.枫丹国际 6.派杰投资银行 7.凯雷投资 8.长安私人资本 9.格林雷斯 10.汉能资本 11.启明创投 12 ...