sphinx,restructuredtext:表格的颜色单元格/行 [英] sphinx, restructuredtext: color cell/row of a table

查看:533
本文介绍了sphinx,restructuredtext:表格的颜色单元格/行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在sphinx的表格中为特定的行着色?

Is there a way to color a specific row in a table in sphinx?

我尝试使用.. role ::它与CSS文件相关,如 sphinx,restructuredtext:为单个词设置颜色。然而,a:角色:似乎在表中不起作用。

I tryed using .. role:: which is related to a CSS file as discused in sphinx, restructuredtext: set color for a single word. However a :role: does not seem to work in a table.

推荐答案

不,但使用CSS选择器 :nth-​​child 将类应用到父表中元素。然后你的自定义CSS就像这样:

No, but there is using the CSS selector :nth-child and applying a class to the parent table element. Then your custom CSS would be something like:

table.myclass tr:nth-child(3) {color: red;}

这篇关于sphinx,restructuredtext:表格的颜色单元格/行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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