网页的滚动长度有限制吗?

发布于 2024-09-04 03:14:23 字数 192 浏览 3 评论 0原文

我有一个客户正在构建一个仅与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

只是偏爱你 2024-09-11 03:14:23

尝试使用这个 JavaScript:

<html>
<head>
<script>
window.onload=function(){
    var i=10000;
    var buff='';
    while(--i){
        buff+='<br />';
    }
    document.body.innerHTML=buff;
}
</script>
</head>
</html>

Try using this Javascript:

<html>
<head>
<script>
window.onload=function(){
    var i=10000;
    var buff='';
    while(--i){
        buff+='<br />';
    }
    document.body.innerHTML=buff;
}
</script>
</head>
</html>
你不是我要的菜∠ 2024-09-11 03:14:23

理论上的答案:你的机器资源是有限的 - 所以是的,有一个限制。

实际的答案:看看其他很长的页面,例如 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

半城柳色半声笛 2024-09-11 03:14:23

尝试一下:

<%
for (int i = 0; i < 25000; i ++) {
  %>test<br /><%
}
%>

Try it with:

<%
for (int i = 0; i < 25000; i ++) {
  %>test<br /><%
}
%>
只为一人 2024-09-11 03:14:23

在我的测试中,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文