- div>anytext..
< /div>anytext..
...
- anytext..
- anytext..li>
....
....
Copy codeThe code is as follows: .pics { float:left; list-style:none ;margin-left:10px;margin-right:10px;/ /The height of the document body in the current window of the browser alert($(document.body).outerHeight(true));
width:230px; %;
margin: 0 auto;
margin-bottom: 10px;
position: relative; > padding-top:10px;
}
.pic {
width:92%; margin:0 auto;
padding-top:10px; > font-size:180px;
background-color:#0CF;
}
.pic img {
width:100%;
margin: 0 auto; >.content {
width:92%;
margin:0 auto;
padding-top:10px;
height:50px; space:nowrap;
overflow:hidden;
}
The script is implemented as follows:
Copy Code
The code is as follows:
$(function(){
//alert($(window).height()); The current window of the browser can View area height
//alert($(document).height());
//Height of the browser’s current window document alert($(document.body).height());
//The total height of the document body in the current window of the browser includes border padding margin alert($(window).width ()); //The width of the visible area of the current window of the browser alert($(document).width()); //The width of the document object of the current window of the browser alert($(document.body). width());
//The height of the document body in the current window of the browser alert($(document.body).outerWidth(true));//The total width of the document body in the current window of the browser includes border padding margin $(document).scroll(function(){ var pics=$(".pics"); var sc=$(document).scrollTop(); $(" #float").text(sc); for(var i=0;ivar bottom =pic. offset().top pic.height();var pic=pics.eq(i); if((sc $(window).height())>=bottom){
eval( "var word=" '"\u' (Math .round(Math.random() * 20901) 19968).toString(16) '"');
var li="" word " div>> }
}
});
});
This basically implements the simplest waterfall flow, but the script does not consider memory consumption, that is, the issue of infinite loading. I don't understand it now, I'll improve it later.
Let’s see the effect: