8
我必須創建具有固定高度和寬度的表格單元格,但內容很多;東西使用overflow: auto
。問題是,我不能在表格單元格使用display: block
(它那種打破錶佈局),所以我嘗試這樣做:如何創建溢出時滾動的表格單元格
height: 100px;
overflow: auto;
position: relative;
width: 1280px;
但它不工作。這裏是我的標記:
<tr>
<td colspan="3" style="width: 1280px; overflow:auto;">
{assign var="latime" value=$agenda|@count}
{assign var="latime" value=$latime*150}
<div style="width: 1280px; position: relative; overflow: auto; ">
<div style="width: {$latime}px; height: 100px; position:relative;">
{assign var="i" value=0}
{foreach from=$agenda item=ag}
{assign var="img" value=$agenda[$i][3]}
<img src="{$img}" id="imag{$i}" onclick='schimbaslidetoti({$i})' />
{assign var="i" value=$i+1}
{/foreach}
</div>
</div>
</td>
</tr>
div的不準TD元素中...... – 2016-04-29 07:04:27
@YoupTube,'td's [可包含(https://www.w3.org/TR/html51/single-page.html# the-td-element)[流量內容](https://www.w3.org/TR/html51/single-page.html#kinds-of-content-flow-content),其中包括'div's – 2017-03-22 12:44:42