Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我想在 TCPDF writehtml() 中将表格单元格的边框设为虚线...我尝试对表格使用边框 = 1,但只有粗边框出现..我也尝试过使用 css, style="border-style: dashed;border-width: 1px; "但边框仍然是同样...谁能指出我正确的方向?
style="border-style: dashed;border-width: 1px; "
根据docs,如果您使用writeHTMLCell(),第 6 个参数代表边框样式。虚线边框如下所示:
writeHTMLCell()
TCPDF::writeHTMLCell( …, array( 'LRTB' => array( 'width' => 1, // careful, this is not px but the unit you declared 'dash' => 1, 'color' => array(0, 0, 0) ) ), … );
这个示例(演示)帮助我在 PHP 中创建表格MultiCell()而不是 HTML。
MultiCell()
style="border:1px dashed;"这对我有用....
style="border:1px dashed;"