将div的水平滚动条固定到页面底部
我有一个比浏览器上呈现的页面长度长的表。该表位于类似于
I have a table which goes longer than the length of the page rendered on the browser. That table is placed within a Div which is like
<Div style="width: 100%; overflow: auto;">
因此,当页面的内容超过表的宽度时,使用浏览器滚动条向下滚动页面,查看上面div底部显示的水平滚动条。
As a result, when the contents of the page exceed the width of the table, I will have to scroll the page down using the browser scroll bar to look at the horizontal scroll bar that appears at the bottom of the above div.
我想永远修复水平滚动条的div在页面的底部。所以我可以滚动到表格的右边,即使不向下滚动。
I want to always fix the horizontal scroll bar of the div at the bottom of the page. So that I can scroll to the right of the table even without scrolling down.
这里是jsFiddle中的示例
Here is a sample in jsFiddle
我如何做?
是的,它显而易见。您已将 overflow:auto;
设置为 div
。每当内容
超出其界限时,它将显示水平/垂直滚动条
如果你真的想从 div
中删除该滚动条并将其设置为浏览器
,只需删除那个css从那个div,并简单地添加到身体。
Yes, its obvious. You had set overflow: auto;
to the div
. It will surely display a horizontal/vertical scroll bar
whenever its content
goes beyond its bound. If you really want to remove that scroll bar from that div
and set it to the browser
, just remove that piece of css from that div and simply add it to the body.