如何使DIV的水平滚动条始终固定显示在页面底部?

编程入门 行业动态 更新时间:2024-10-10 08:23:34
本文介绍了如何使DIV的水平滚动条始终固定显示在页面底部?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

看起来像这样: jsfiddle/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的水平滚动条始终固定显示在页面底部?

本文发布于:2023-11-23 00:41:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:滚动条   水平   页面   DIV

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!