使用 Blueprint CSS 框架时如何创建不交替行颜色的表格?
默认情况下,Blueprint CSS 框架使所有表格行具有交替颜色。如何禁用一张表的这种行为?
我尝试使用 Chrome 开发人员工具来查看 Chrome 用于已定义表格的所有样式,但没有找到为行设置颜色的样式。我也上网查了一下,没有找到解决办法。这就像魔法一样......
有人可以帮助我吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要一个更具体的选择器来覆盖... BP 非常通用,因此这不应该成为问题,例如:
您可以用任何颜色替换透明,使所有行都变为纯色。
You need a more specific selector to override... BP is pretty general though so that shouldnt be an issue for example:
you can replace transparent with whatever color to make all rows a solid color.
我只是在我自己的CSS文件中进行覆盖
tbody tr:nth-child(even) td, tbody tr.even td {background:none;}
I would just do override in my own css file
tbody tr:nth-child(even) td, tbody tr.even td {background:none;}
这是我放入 CSS 文件顶部的内容,用于禁用 Blueprint 的偶数表行背景颜色。
This is what I put into the top of my CSS file to disable Blueprint's even table rows background color.
可能搜索并删除(来自 screen.css)
Possibly search for and remove (From screen.css)