有没有办法为 sphinx 中表格中的特定行着色?
我尝试使用 .. role:: ,它与 CSS 文件相关,如中讨论的sphinx,restructedtext:为单个单词设置颜色 https://stackoverflow.com/questions/3702865/sphinx-restructuredtext-set-color-for-a-single-word。然而 :role: 似乎在表中不起作用。
不,但是可以使用 CSS 选择器:nth-child https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child and 将类应用于父表元素 https://stackoverflow.com/questions/33493589/add-a-class-to-a-table-in-sphinx#33497002。那么你的自定义 CSS 会是这样的:
table.myclass tr:nth-child(3) {color: red;}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)