如何更改 reStructuredText 中表格单元格的背景颜色?
以下如何在带有重构文本 (rst2html.py) 的文本中使用颜色或如何插入没有空行的 HTML 标记? 我能够在表格中设置文本的背景,如下所示
.. role:: gbg
.. raw:: html
<style>
.gbg {background-color:#00ff00;}
</style>
+-------+----------------+-------+---------+-------+---------+
| UTC+1 | (d-s) | UTC-6 | (zo) | UTC-7 | (za) |
+=======+================+=======+=========+=======+=========+
| 15:00 | :gbg:`avail` | 8:00 | | 7:00 | |
+-------+ +-------+---------+-------+ +
| 15:30 | | 8:30 | | 7:30 | |
+-------+----------------+-------+---------+-------+---------+
: “avail”一词在字母后面有绿色背景,但是如何使整个单元格具有彩色背景,而不仅仅是这些字母后面的部分?
Following How to use color in text with ReStructured Text (rst2html.py) or how to insert HTML tags without blank lines? I was able to set the background of the text within a table, like this:
.. role:: gbg
.. raw:: html
<style>
.gbg {background-color:#00ff00;}
</style>
+-------+----------------+-------+---------+-------+---------+
| UTC+1 | (d-s) | UTC-6 | (zo) | UTC-7 | (za) |
+=======+================+=======+=========+=======+=========+
| 15:00 | :gbg:`avail` | 8:00 | | 7:00 | |
+-------+ +-------+---------+-------+ +
| 15:30 | | 8:30 | | 7:30 | |
+-------+----------------+-------+---------+-------+---------+
That results in the word "avail" having a green background behind the letters, but how can I make the entire cell have a colored background instead of just the part of it behind those letters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
用 javascript 拼凑它:
Kludge it with javascript:
休息:
CSS:
REsT:
CSS: