当使用Blueprint CSS框架时,如何创建一个不交替行颜色的表? [英] How to create a table WITHOUT alternating row colors when using Blueprint CSS framework?
问题描述
默认情况下,Blueprint CSS框架使所有表格行交替显示颜色。如何为一个表禁用此行为?
我试图使用Chrome开发者工具查看Chrome用于定义表格的所有样式,但没有找到样式将设置行的颜色。我也搜索互联网,没有找到一个解决方案。这就像魔术...
任何人都可以帮助我?
你需要一个更具体的选择器来覆盖... BP是相当一般的,所以不应该是一个问题,例如:
table.no-zebra tbody tr:nth-child(even)td,
table.no-zebra tbody tr.even td {
background:transparent;
}
您可以用任何颜色替换transparent,使所有行都是纯色。 / p>
The Blueprint CSS framework makes all table rows of alternating colors by default. How to disable this behaviour for one table?
I tried to use Chrome Developer Tools to see all the styles Chrome uses for a defined table, but did not find the style which would set the colors for rows. I also searched the Internet and did not find a solution. It's like magic...
Anyone can help me out?
Thanks in advance!
You need a more specific selector to override... BP is pretty general though so that shouldnt be an issue for example:
table.no-zebra tbody tr:nth-child(even) td,
table.no-zebra tbody tr.even td {
background: transparent;
}
you can replace transparent with whatever color to make all rows a solid color.
这篇关于当使用Blueprint CSS框架时,如何创建一个不交替行颜色的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!