簡體   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