网页的滚动长度有限制吗?
我有一个客户正在构建一个仅与 IE8 一起使用的业务应用程序。
要求之一是在单个页面中显示所有数据。我预计该数据表的长度在 3K - 10K 像素之间。在最坏的情况下,超过25K像素。
提供这么长的页面时需要考虑哪些技术因素?页面长度是否有限制,IE会显示错误?
该应用程序基于 Java/Struts。
I have a client who is building a business application that will be used with IE8 only.
One of the requirements is to display all of the data in a single page. I am anticipating this data table to be somewhere between 3K - 10K pixels in length. In the worst case scenarios, more than 25K pixels.
What are the technical considerations when serving a page that long? Is there a limit on page length and IE would display a error?
The application is Java/Struts based.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试使用这个 JavaScript:
Try using this Javascript:
理论上的答案:你的机器资源是有限的 - 所以是的,有一个限制。
实际的答案:看看其他很长的页面,例如 http: //svnbook.red-bean.com/en/1.5/svn-book.html
The theoretical answer: Your machine resources are finite - so yes, there's a limit.
The practical answer: Take a look at other very long pages, e.g. http://svnbook.red-bean.com/en/1.5/svn-book.html
尝试一下:
Try it with:
在我的测试中,IE10 停在略低于 1534000 像素的位置。该限制包括视口到可滚动区域的高度,因此实际的scrollTop 是该限制减去元素的高度。
如果您设置 CSS 样式 -ms-scroll-limit-y-max ,它似乎会限制在最大允许值。但就我而言,我偶然发现了这个数字。
IE10 stops at just under 1534000px in my testing. The limit includes the height of the viewport into the scrollable area so the actual scrollTop is the limit minus the height of the element.
If you set CSS style -ms-scroll-limit-y-max it will clamp at the maximum allowed value, it seems. But in my case I stumbled on this number by accident.