繁体   English   中英

html-pdf 文本对齐:证明不起作用?

[英]html-pdf text-align: justify not working?

我在 Node.js 中使用 html-pdf 将 html 文本转换为 pdf。 文本对齐:左、中、右工作。 但是 text-align: justify 不起作用。 当 text-align 对齐时,它导出左对齐的文本。

这是 HTML 代码:

<p class="ql-align-justify"><span style="background-color: rgb(255, 255, 255);">Hello, this is some text. Hello, this is some text. Hello, this is some text. Hello, this is some text. Hello, this is some text. Hello, this is some text. Hello, this is some text. Hello, this is some text. </span></p>

这是CSS代码:

      .ql-align-justify {
          text-align: justify;
      }

如何使 text-align: justify 工作?

似乎您需要将 WIDTH 设置为您的跨度,这会有所帮助。

暂无
暂无

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

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