使用Bootstrap的CSS类时如何改变表格单元格的背景色? 您所在的位置:网站首页 html改变表格颜色 使用Bootstrap的CSS类时如何改变表格单元格的背景色?

使用Bootstrap的CSS类时如何改变表格单元格的背景色?

#使用Bootstrap的CSS类时如何改变表格单元格的背景色? | 来源: 网络整理| 查看: 265

只需使用!important指令覆盖 Bootstrap 设置的任何其他行为。查看here以获得更多信息。

td.colorfy { background: blue !important; color: white; } cell cell cell

或者在设置css规则时更具体一些:一个二个一个一个在bootstrap css中,颜色被指定为:

.table>:not(caption)>*>* { padding: .5rem .5rem; background-color: var(--bs-table-bg); border-bottom-width: 1px; box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg) }

而且比你的定义更具体,它就赢了。通过更具体的 Bootstrap 或使用!important,你可以实现新的背景颜色。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有