html - 给表格添加滚动条

标签 html css

我想在带有固定标题的表格中添加垂直和水平滚动条。通过使用 theadtbody 标签,我可以在 firefox 中添加滚动条,但 IE 不支持 tbodyoverflow:auto 属性。 IE8 不支持 css 表达式,您能告诉我如何实现吗?

最佳答案

使用 CSS 应该很容易

div.scrollWrapper{

  height:250px;
  width:200px;
  overflow:scroll;
}


<div class="scrollWrapper">
<table >
<tbody height="xxx">
<tr>......

</tbody>
</table>
</div>

关于html - 给表格添加滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1320914/

相关文章:

javascript - 如何将 CSS 应用于输入标签值

html - 如何 "scale down"一个大的 HTML 页面

javascript - 段落选择器内的标题不起作用

css - 在 SASS 中使用变量编写专门的转换

css - 如何显示 <div> 内联文字包围?

javascript - 选项卡焦点未正确显示

html - Bootstrap 基本网格布局冲突

jquery - 向多个元素添加类

html - 某些 css 属性不起作用

python - Beautifulsoup - 删除 HTML 标签