gpt4 book ai didi

php - 我可以在创建 PDF 时在 mPdf 中使用内联 css 吗?

转载 作者:行者123 更新时间:2023-11-28 01:04:40 24 4
gpt4 key购买 nike

我已经用外部 CSS 做到了。但是当我尝试使用内联 CSS 时,它不起作用。

我可以在创建 PDF 时在 mPdf 中使用内联 css 吗?请指导我。

最佳答案

根据mPDF documentation ,是的:

The following are supported (in order of ascending priority - lower ones in list overwrite higher):

  • HTML attributes e.g. <div align="center"> (see supported HTML attributes)

  • CSS Stylesheets - included in header of HTML document or as <link /> or as @import()

    • html tags e.g. p { font-size:12pt; color:#880000; }
    • class e.g. .stylename { font-size:9pt; }
    • id e.g. #style { font-size:9pt; }
  • In-line CSS style e.g. <p style="font-family:monospace;">

(强调我的)

关于php - 我可以在创建 PDF 时在 mPdf 中使用内联 css 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40418535/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com