HTML-启用表格单元格内的滚动 [英] HTML - Enable Scrolling within a Table's Cell
本文介绍了HTML-启用表格单元格内的滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有一个宽度和高度固定的表格单元....并且我的数据超出了单元的固定尺寸...
Let's say I have a table cell with fixed width and height.... and I have data that exceeds the cell's fixed dimensions...
<td width="500" height="300">lots of data that exceeds the dimensions</td>
- 我可以在单元格中启用此数据滚动吗...。
- 如果不解决问题的话..我只有 500 x 300 空间
- can I enable scrolling of this data within a cell....
- if not than what is the solution.. I only have that 500 x 300 space
推荐答案
最简单的方法是添加一个500 x 300 div,并赋予它 overflow:auto
The easiest thing would be to add a 500 x 300 div and give it overflow: auto
<td width="500" height="300">
<div style="width: 500px; height: 300px; overflow: auto">
lots of data that exceeds the dimensions
</div>
</td>
这篇关于HTML-启用表格单元格内的滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文