JS implements a picture to show the waterfall effect (a simple example)
I do not know, you have found that the general picture display site will use the waterfall flow effect, the predicate waterfall stream
is not a picture on the web site. The sub is cached, but when you roll to a certain distance, the
picture will continue to cache, and the picture is random, just the same width, the height is not
like the waterfall, so it is called the waterfall effect. Next, I'll give you the code. Let's try some pictures at
[code]
.lt; HTML lang=.quot; en.quot;.Gt;
.lt; head.gt;
! Box ul{float: left; width: 200px; margin-right: 50px;}
#box img{width: 200px. L.gt;
.Lt; /div.gt;
.Lt; script.gt;
var box=document.getElementById ('box');
>. .
var newli=document.createElement ('li');
newli.innerHTML='.lt; img src=.quot; images/' srcNum'.png.quot; alt=.quot;'li';' / / this is the file name of the picture, and the requirements are unified.
var minH=Math.min (ul.#91; 0.#93;.ClientHeight, ul.#91; 1.#93;.ClientHeight, ul.#91; 2.#93;.ClientHeight). }
}
ul.#91; x.#93;.AppendChild (newli);
}
for (VaR I = 0). UmentElement.scrollHeight;
var scrollT=document.body.scrollTop||document.documentElement.scrollTop;
if (winH-scrollT-viewH.lt; 500) {
for (VaR I = 0; I VaR; 20; > > > > > >; />.lt; /html.gt; [/code]