Table 边框未显示在 outlook 桌面应用程序中,但在通过浏览器打开时在 gmail 和 outlook 中可见

Table borders not showing up in outlook desktop app but is visible in gmail and outlook when opened through browser

我需要以presentable格式以table的形式向用户发送数据。 我有执行此操作的代码,但无法找到它为何未显示在 Outlook 桌面应用程序中的原因。我怎样才能确保它也适用于 Outlook 应用程序?

我已经尝试过使用十六进制代码和黑色灰色红色等颜色,但没有任何效果。

table1.get_html_string(attributes={”border-top”:”2px solid #000000"})
print(table1)
<table frame="box" rules="all" border-top="2px solid #000000">
    <tr>

此 table 通过邮件发送时以 table 格式打印但跳过边框,仅通过 Outlook 桌面 App.Works 通过浏览器打开时在 gmail 和 outlook 上正常

border-top 在 Outlook 中工作得很好。你 css 无效。试试这个:

<table style="border-top: 2px solid #000000;">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

祝你好运。