twitter-bootstrap css交替行颜色引导

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22404535/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 20:17:59  来源:igfitidea点击:

css alternate row colour bootstrap

csstwitter-bootstraptwitter-bootstrap-3

提问by Namit

I am using the Bootstrap framework v3.1.1. The table class table table-striped, colours the alternate rows #f9f9f9.

我正在使用 Bootstrap 框架 v3.1.1。表类table table-striped为交替行着色#f9f9f9

I am trying to use css to overwrite this rule with

我正在尝试使用 css 覆盖此规则

.table-striped>tbody>tr:hover {
    background-color: #efefef;
}

Using the above colours the non colourd rows by bootstrap however not the ones already coloured.

通过引导程序使用上述颜色的非彩色行,而不是已经着色的行。

采纳答案by Pinki

.table-striped > tbody > tr:hover > td {
    background-color: #efefef;
}

This should work for every row

这应该适用于每一行