bootstrap table给行怎么加背景色
bootstrap table定义代码:
$table.bootstrapTable({ showExport: true, height: 540, rowStyle:rowStyle,//通过自定义函数设置行样式 columns: [ { field: 'id', title: '序号', align: 'center', sortable: true }, { field: 'sid', title: '学号', align: 'center' }, ]});
登录后复制
bootstrapTable设置行样式(背景颜色)函数1:通过调用bootstrap默认的样式来设置指定行的背景颜色
function rowStyle(row, index) { var classes = ['active', 'success', 'info', 'warning', 'danger']; if (index % 2 === 0 && index / 2bootstrapTable设置行样式(背景颜色)函数2:调用自定义样式设置指定行的字体颜色
function rowStyle(row, index) { var style = {}; style={css:{'color':'#ed5565'}}; return style;}登录后复制
相关推荐:《bootstrap教程》
以上就是bootstrap table给行怎么加背景色的详细内容,更多请关注【创想鸟】其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至253000106@qq.com举报,一经查实,本站将立刻删除。
发布者:PHP中文网,转转请注明出处:https://www.chuangxiangniao.com/p/3002505.html