HTML – 在表格的单元格中启用滚动

前端之家收集整理的这篇文章主要介绍了HTML – 在表格的单元格中启用滚动前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
假设我有一个固定宽度和高度的表格单元格……我的数据超出了单元格的固定尺寸……
<td width="500" height="300">lots of data that exceeds the dimensions</td>

>我可以在单元格中启用滚动此数据….
>如果不是什么解决方案..我只有500 x 300的空间

解决方法

最简单的方法添加一个500 x 300 div并给它溢出:auto
<td width="500" height="300">
 <div style="width: 500px; height: 300px; overflow: auto">
  lots of data that exceeds the dimensions
 </div>
</td>
原文链接:https://www.f2er.com/html/226115.html

猜你在找的HTML相关文章