我在Node.js中使用html-pdf将html文本转换为pdf。文本对齐:左对齐、居中和右对齐。但是文本对齐: justify不起作用。当文本对齐时,它会导出文本左对齐。
下面是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;
}如何使文本对齐: justify工作?
发布于 2020-01-15 21:42:34
似乎你需要设置你的跨度的宽度,这将会有帮助。
https://stackoverflow.com/questions/59751408
复制相似问题