隐藏表格滚动条 [英] Hide table scrollbar

查看:127
本文介绍了隐藏表格滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过一些研究,我发现我必须设置表的主体

After some researches I found out that I have to set the tbody of a table

display: block;
overflow: auto;

可以在html表上滚动。

to enable scrolling on a html table.

是否可以在每个现代浏览器(Chrome,Safari,Firefox)上隐藏通用滚动条?我尝试了一些解决方案,例如,但不适用于表。

Is there a possibility to hide the scrollbar generic on every modern browser (Chrome, Safari, Firefox)? I tried some solutions like this one but it doesn't work on a table.

推荐答案

使用 overflow:隐藏; 将内容隐藏在容器外部,或 overflow:可见; 来显示它,即使它超出了容器边界。都删除滚动条。

Use overflow: hidden; to hide the content outside of the container, or overflow: visible; to display it even if it's going outside of the container borders. Both remove the scrollbar.

这篇关于隐藏表格滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆