html – 更改引导表的边框颜色的最佳方法是什么?

html – 更改引导表的边框颜色的最佳方法是什么?,第1张

概述我使用bootstrap表类. 默认边框颜色是灰色/银色 – 我想. 但我想将边框颜色更改为红色,但我无法使其工作. 这就是我所拥有的 CSS .table {border: red solid 1px !important;} HTML:表格 <table class="table table-bordered piechart-key "> <thead > <t 我使用bootstrap表类.
默认边框颜色是灰色/银色 – 我想.

但我想将边框颜色更改为红色,但我无法使其工作.

这就是我所拥有的

CSS

.table {border: red solID 1px !important;}

HTML:表格

<table >    <thead >        <th></th>        <th></th>        <th> Item Summary</th>        <th> Item List</th>    </thead>    <tbody>        <tr>            <td wIDth="30"></td>            <td wIDth="200">                &gt; 50% of students answered these items correctly            </td>            <td wIDth="50">5/25</td>            <td wIDth="100">5,10,15,19,23</td>        </tr>        <tr>            <td wIDth="30"></td>            <td wIDth="200">50% up to 75% of students answered these items correctly</td>            <td wIDth="50">8/25</td>            <td wIDth="100">3,7,11,13,14,16,21,22</td>        </tr>        <tr>            <td wIDth="30"></td>            <td wIDth="200">&ge; 75% of students answered these items correctly</td>            <td wIDth="50">12/25</td>            <td wIDth="100">1,2,4,6,8,9,12,17,18,20,24,25</td>        </tr>    </tbody></table>

Here is my JSFiddle

更改引导程序表的边框颜色的最佳方法是什么?

解决方法 尝试将其应用于单元格:

.table td{    border: red solID 1px !important;}

对于标题:

.table th{    border: red solID 1px !important;}

http://jsfiddle.net/w0b73dwt/7/

编辑

OBS:我使用了!important指令,因为我找不到其他简单的方法.当然,我们都知道这是一个糟糕的CSS实践,但在某些情况下,我们将不得不承担风险.另一种方法是找到bootstrap如何声明其样式并为td和th创建一个具有更高优先级的css选择器.在这种情况下,这可能会在第一次引导更新时中断.

总结

以上是内存溢出为你收集整理的html – 更改引导表的边框颜色的最佳方法是什么?全部内容,希望文章能够帮你解决html – 更改引导表的边框颜色的最佳方法是什么?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1078044.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存