我已经用外部 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/