如何使DIV的水平滚动条始终固定显示在页面底部? [英] How can I make the horizontal scrollbar for a DIV always appear fixed on the bottom of the page?

查看:2043
本文介绍了如何使DIV的水平滚动条始终固定显示在页面底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,其中包含一个大(宽)表.该表位于jquery UI选项卡中.

I have a website which contains a large (and wide) table. The table is placed inside jquery UI tabs.

看起来像这样: http://jsfiddle.net/Tq3Rg/

对于用户而言,这可能有点烦人,因为他必须一直走到表格和页面的底部才能向右滚动.

For the user this can be somewhat annoying since he has to go all the way to the bottom of the table and page to scroll right.

是否可以使滚动条始终在页面底部显示为固定?

Is it possible to make the scrollbar always appear fixed on the bottom of the page?

推荐答案

设置一个固定的高度(不要使用内联样式):

Set a fixed height (and don't use inline-styles):

您更改后的演示

Your altered Demo

代码:

.top{
   height:10%;
}
.center{
   overflow:scroll;
   height:80%;
}
.bottom{
   height:10%;
}

如果您真的想在页面的最底部放置滚动条,则可以查看此答案无需自定义滚动条和类似内容即可实现这一目标.

If you really want to have the scrollbars at the very bottom of your page, you could check this answer on how to achieve this without needing custom scrollbars and such stuff.

这篇关于如何使DIV的水平滚动条始终固定显示在页面底部?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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