网页可以多长时间? [英] How long can a webpage be?

查看:98
本文介绍了网页可以多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个奇怪的问题,但是有谁知道网页的长度的实际限制,为什么是极限?

Bit of a bizarre question, but does anyone know the actual limit to the length of a webpage, and why it is the limit?

作为一个实验,我使用HTML和CSS来创建一个表示1:1的比例的旅程的网站。我有一个ul列表的标记沿着我已经分离与大边距在CSS。但是,到目前为止我可以工作的最长的保证金是

As an experiment, I'm using HTML and CSS to make a site that represents a journey to a scale of 1:1. I have a ul list of markers along the way that I have separated with large margins in the css. However, the longest margin I can get to work so far is

top-margin:100000cm;

由于有43个列表项,相当于4,300,000厘米,即43Km。有人知道为什么它在这个标记周围的极限,或我怎么会得到它更长?我目前使用Safari进行测试。

Since there are 43 list items, that equates to 4,300,000cm, or 43Km. Does anyone know why it's hitting a limit around this mark, or how I might go about getting it longer? I'm using Safari for testing currently.

推荐答案

它似乎只是一个最大值,可以设置margin-top属性至。我试过价值高达400,000厘米与100元素和页面加载他们都很好。我甚至尝试增加多达1000个元素,看看数字是否受到加载时间,但没有什么。它似乎是一个确切的数字在40万到50万之间,它切断并缩短超过该值。

It appears to simply be a maximum value that margin-top property can be set to. I've tried values up to 400,000cm with 100 elements and the page loads them all fine. I even tried incrementing that up to 1000 elements to see if the number was affected by load time, but nothing. It does appear to be an exact number somewhere between 400,000 and 500,000 that it cuts off at and shortens down past that value.

我使用的代码(工作,显示完整):

Code I used (which worked, showed in full):

<?php

print "<ul>";
for ($i = 1; $i <= 1000; $i++) print "<li style=\"margin-top: 400000cm;\">{$i}</li>";
print "</ul>";
die();

?>

这篇关于网页可以多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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