我有以下html表片段:
<td>
<div>
<a class="fancy_image" href="/owner/createCompany/getOriginalImage/3" title=""><img class="image-lis-in-table-cell" src="/owner/createCompany/getMediumThumbnail/3" alt=""></a>
<a class="fancy_image" href="/owner/createCompany/getOriginalImage/1" title=""><img class="image-lis-in-table-cell" src="/owner/createCompany/getMediumThumbnail/1" alt=""></a>
<a class="fancy_image" href="/owner/createCompany/getOriginalImage/5" title=""><img class="image-lis-in-table-cell" src="/owner/createCompany/getMediumThumbnail/5" alt=""></a>
<a class="fancy_image" href="/owner/createCompany/getOriginalImage/2" title=""><img class="image-lis-in-table-cell" src="/owner/createCompany/getMediumThumbnail/2" alt=""></a>
<a class="fancy_image" href="/owner/createCompany/getOriginalImage/4" title=""><img class="image-lis-in-table-cell" src="/owner/createCompany/getMediumThumbnail/4" alt=""></a>
</div>
</td>
它看起来像这样:
当我在表格单元格tr
中有超过2张图片时,会发生变化。它看起来很难看。我希望这些图片只在一行内呈现,如果有太多图片,我想看到滚动。
可以为我的愿望提供风格。
答案 0 :(得分:0)
.image-lis-in-table-cell {
margin: auto;
white-space: nowrap;
width: 100%;
overflow:auto; }
如果你需要更多,那么你可以使用任何一个
overflow-x:scroll
或overflow-y:scroll
;