javascript实现仿百度图片的瀑布流加载效果_javascript技巧

WBOY
Release: 2016-05-16 15:04:44
Original
1628 people have browsed it

由于没有服务器,就用一个json字符串作为下拉时加载图片数据的来源了

html:

      
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
javascript实现仿百度图片的瀑布流加载效果_javascript技巧
Copy after login

JSWallper.js:

window.onload=function(){ waterfall('main','pin'); var dataInt={'data':[{'src':'1.jpg'},{'src':'2.jpg'},{'src':'3.jpg'},{'src':'4.jpg'}]}; window.onscroll=function(){ if(checkscrollside()){ var oParent = document.getElementById('main');// 父级对象 for(var i=0;i
         
Copy after login

演示图:

源码下载:http://www.jb51.net/jiaoben/452663.html

演示地址:http://demo.jb51.net/js/2016/JSWallper/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!