[英]Prevent Resizing of Image Inside a Table (Table is in inside another Cell)
my app is able to make PDF documents and I have issues displaying multiple images in a cell.我的应用程序能够制作 PDF 文档,但我在一个单元格中显示多个图像时遇到问题。
<td class="table-cell" style="vertical-align: top;">
<table class="photo">
<tr>
@forelse ($item->photos as $photo)
<td class="inline-block">
<img src="{{HelpMe::photo_tumbnail_200($photo->filepath)}}">
</td>
@empty
Item does not have any photo.
@endforelse
</tr>
</table>
</td>
So what happens is that if I have 15 images in that loop, it will put 15 resized images right next to each other in one row.所以发生的情况是,如果我在该循环中有 15 张图像,它会将 15 张调整大小的图像放在一行中。 I dont want the table to resize the images, when space runs out on that row, I want it to jump to the next row.
我不希望表格调整图像大小,当该行的空间用完时,我希望它跳到下一行。
How could i make this happen?我怎么能做到这一点?
you can add <table class="photo flex flex-wrap -mb-4">
as you can see here您可以在此处添加
<table class="photo flex flex-wrap -mb-4">
<td class="table-cell" style="vertical-align: top;">
<table class="photo flex flex-wrap -mb-4">
<tr class="w-1/3 mb-4 bg-gray-400 h-12">
@forelse ($item->photos as $photo)
<img src="{{HelpMe::photo_tumbnail_200($photo->filepath)}}">
</td>
@empty
Item does not have any photo.
@endforelse
</tr>
</table>
</td>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.