使用html-docx.js时,display:flex等样式不生效怎么办?

使用html-docx.js插件,引入的样式无效?使用display:flex或display:box都没用

<div style='display:flex'>
  <img src=""></img>
  <div>123</div>
</div>

image.png
使用table后border设置为none或0,word下载下来都有边框线

阅读 1.3k
1 个回答

使用表格布局来替代

<!DOCTYPE html>
<html>
<head>
  <style>
    table {
      border-collapse: collapse;
    }
    td {
      border: none;
    }
  </style>
</head>
<body>
  <table>
    <tr>
      <td><img src="" alt="image"></td>
      <td>123</td>
    </tr>
  </table>
</body>
</html>
  
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题