使用html的表的垂直滚动条 [英] vertical scrolling bar for a table using html

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

问题描述

我想为网页中的HTML表格修正一个高度,如果它自动传递高度,则会显示一个垂直滚动条。

I want to fixe a height for my html table in the web page and if it pass the height automatically a vertical scrolling bar is shown.

请帮助。 / p>

please help.

推荐答案

这不是滚动的表,而是后面的div。

It's not the table that scrolls, it is the div behind it.

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

使用 overflow-y

注意:

Note: setting an overflow attribute to scroll will always display the scrollbars. If you want the horizontal/vertical scrollbars to only show up when needed, use auto.

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

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