我正在研究mpdf,这是将html页面转换为pdf的很好的库,但是当我将块元素例如< div>< p>在表格单元格内,它的行为不像是块元素,而是像内联元素.
码:
Block Element
要么
Block Element
有没有办法使它成为块元素?
还是应该使用其他图书馆?
提前致谢.
解决方法:
寻找相同问题的解决方案时,我才意识到根据文档,这不是错误,而是功能限制:
Block-level tags (DIV, P etc) are ignored inside tables, including any
CSS styles – inline CSS or stylesheet classes, id etc. To set text
characteristics within a table/cell, either define the CSS for the
table/cell, or use in-line tags e.g.
似乎目前无法解决.
在我的情况下,我必须使用& nb缩进(fake-center)一个< h4>标题.
标签:mpdf,codeigniter,css,html,php
来源: https://codeday.me/bug/20191027/1942356.html