大佬教程收集整理的这篇文章主要介绍了如何突出显示带有Bootstrap的HTML表格列,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
例如,在下表中,我希望具有一个颜色背景的当前列和新列有另一个。
<table> <thead> <tr> <td></td> <td colspan="2" style="text-align: center;">Current</td> <td colspan="2" style="text-align: center;">New</td> </tr> <tr> <th>ID</th> <th>First Name</th> <th>last name</th> <th>Fisrt Name</th> <th>last name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>John</td> <td>Bauer</td> <td>Jack</td> <td>Bauer</td> </tr> </tbody> </table>
更新:我已经取得了一些我正在寻找使用COlgroup和唉,自定义CSS(虽然不是很多):http://jsfiddle.net/75v7W/4/
注意:对于下面的背景颜色,我从bootstrap.css中的默认颜色从成功,错误等中提取出来。如果您已经定制了bootstrap.css,这些特定的颜色可能对您无效。
CSS
colgroup col.success { BACkground-color: #dff0d8; } colgroup col.error{ BACkground-color: #f2dede; } colgroup col.warning { BACkground-color: #fcf8e3; } colgroup col.info { BACkground-color: #d9edf7;
表
<table class="table table-condensed"> <colgroup> <col> <col span="2" class="info"> <col span="2" class="success"> </colgroup> <thead> <tr> <td></td> <td colspan="2" style="text-align: center;">Current</td> <td colspan="2" style="text-align: center;">New</td> </tr> <tr> <th>ID</th> <th>First Name</th> <th>last name</th> <th>Fisrt Name</th> <th>last name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>John</td> <td>Bauer</td> <td>Jack</td> <td>Bauer</td> </tr> </tbody> </table>
以上是大佬教程为你收集整理的如何突出显示带有Bootstrap的HTML表格列全部内容,希望文章能够帮你解决如何突出显示带有Bootstrap的HTML表格列所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。