如何在 Bootstrap 中更改悬停在表格上的悬停颜色? [英] How do I change the hover over color for a hover over table in Bootstrap?

查看:32
本文介绍了如何在 Bootstrap 中更改悬停在表格上的悬停颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张桌子,类别为table-hover".默认悬停颜色是白色/浅灰色.我如何改变这个颜色?

I have a table with class 'table-hover'. The default hover over color is a white / light grey. How do I change this color?

我尝试通过将以下内容添加到我的主要样式表来覆盖默认值

I've tried overwriting the default by adding the following to my dominant style sheet

.table-hover tbody tr:hover > th {
  background-color: #D1D119;
}

不幸的是,上述方法不起作用

Unfortunately, the above does not work

推荐答案

试试这个:

.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
  background-color: #color;
}

这篇关于如何在 Bootstrap 中更改悬停在表格上的悬停颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆