html - 如何向 div 中的表格添加水平滚动条?

标签 html css html-table scrollbar

如何向位于 div 内的表格添加水平滚动条? 有没有 CSS 解决方案?

最佳答案

您不能将滚动条添加到表中,但可以将它添加到包含您的表的 DIV 中。

例如:

<div style="width: 400px; height: 200px; overflow: scroll;">
   <table>...</table>
</div>

关于html - 如何向 div 中的表格添加水平滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10925019/

相关文章:

javascript - 如何禁用缩略图的 jquery 功能

html - 在 Bootstrap 中使用 image-circle 保持完美的圆

javascript - 'Cannot read property 'lastChild' of null' 节点不存在怎么办?

html - 具有多个表格的 CSS 表格边框

html - 使 div 拉伸(stretch)以适应 td 高度

css - IE8中的透明背景色

html - 如何让 "file"类型的HTML输入元素只接受pdf文件?

html - Firefox和Chrome之间的flex-shrink差异

jquery - 如何使用 jquery 查找和替换 HTML 标签属性?

javascript - 当动态图像数量时在html中水平分布