简体   繁体   English

无法在 jupyter notebook markdown 单元格中添加表格边框

[英]cannot add table borders in jupyter notebook markdown cell

I am trying to get solid black table borders on my html table in jupyter notebook.我正在尝试在 jupyter 笔记本中的 html 表格上获得纯黑色表格边框。 I run the following code in a markdown cell:我在 markdown 单元中运行以下代码:

<table {style="border-style: solid;"}>
    <tr>
        <td>parameter
        </td>
        <td>eenheid
        </td>
        <td>waarde
        </td>
    </tr>   
    <tr>
        <td>$RR$
        </td>
        <td>$\text{[-]}$
        </td>
        <td>0.03
        </td>
    </tr>
</table>

But now I would like all cells in the table (all td and tr elements) to have their own border.但现在我希望表格中的所有单元格(所有 td 和 tr 元素)都有自己的边框。 Is there really no other way to do this than adding a {style="border-style: solid;"} to each td and tr element?除了向每个 td 和 tr 元素添加{style="border-style: solid;"}之外,真的没有其他方法可以做到这一点吗?

Adding table borders is really basic functionality.添加表格边框确实是基本功能。 It shouldn't be this hard.不应该这么难。

You can do it this way (in a CSS file or tag):您可以这样做(在 CSS 文件或标签中):

table tr {
 border-style: solid;
}
table tr td {
  border-style: solid;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM