您好,我在laravel中使用pdfdom,并且我有此任务,我尝试将两列放在同一行中,因为该库不支持flex,我尝试过这样的事情:
<style type="text/css">
.table-matrix{
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
margin:10px;
width: 300px;
white-space: normal;
word-wrap: break-all;
}
</style>
<br>
<table>
@php ($i = count($question->answers))
@foreach($question->answers as $answer)
@if ($i % 2 != 0)
<tr>
@endif
@if($answer->is_key == 0)
<td>{{$answer->text}}</td>
@endif
@if($answer->is_key == 1)
<td>{{$answer->text}}</td>
@endif
@if ($i % 2 == 0)
</tr>
@endif
@php ($i--)
@endforeach
</table>
但是它给我错误Dompdf \ Exception
在cellmap中找不到框架我认为与tr
有关,我不知道该怎么办有人可以帮我吗?