bootstrap table给行怎么加背景色

互联网 19-7-23

bootstrap table给行怎么加背景色

$table.bootstrapTable({     showExport: true,     height: 540,     rowStyle:rowStyle,//通过自定义函数设置行样式     columns: [         {             field: 'id',             title: '序号',             align: 'center',             sortable: true         }, {             field: 'sid',             title: '学号',             align: 'center'         },     ] });
function rowStyle(row, index) {     var classes = ['active', 'success', 'info', 'warning', 'danger'];     if (index % 2 === 0 && index / 2 < classes.length) {         return {             classes: classes[index / 2]         };     }     return {}; }
function rowStyle(row, index) {     var style = {};                 style={css:{'color':'#ed5565'}};                    return style; }

相关推荐:《bootstrap教程》

以上就是bootstrap table给行怎么加背景色的详细内容,更多内容请关注技术你好其它相关文章!

来源链接:
免责声明:
1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险
2.本文版权归属原作所有,仅代表作者本人观点,不代表本站的观点或立场
标签: bootstrap
上一篇:php获取远程图片并下载保存到本地的方法分析 下一篇:bootstrap属于js框架吗

相关资讯