【发布时间】:2022-01-02 04:12:05
【问题描述】:
我正在尝试使用以下方法将一些 HTML 内容转换为 MS word,但是我尝试设置为表格行的某些样式(例如边框底部)在转换后的 word 文档中根本不可见.有人可以帮我吗?
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<body>
<table>
<tr style="border-bottom:2pt solid #AFAFAF">
<td>One</td>
<td>1</td>
</tr>
<tr style="border-bottom:2pt solid #AFAFAF">
<td>One</td>
<td>1</td>
</tr>
</table>
</body>
</html>
我什至尝试设置 style="mso-border-bottom-alt: solid #AFAFAF 2pt;" 也不起作用。我的要求非常具体,我应该为每一行设置底部边框。
【问题讨论】:
-
尝试将边框放置到
td。 -
将border-bottom 设置为
td是有效的,但是两个的边框之间有一个我不想要的微小间隙。我想要每行下方的直线底部边框。您还有其他建议吗? 将CELLSPACING="0"设置为以及将边框底部应用于
标签: html css html-table ms-word