我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

too long

well, i am reading out an image folder with lets say 300 images with php. It runs fine.

To reduce bandwidth, i want to load the images only, if they are in the viewport.

If I'm not wrong you want your images to load when you scroll down the page. So, you need to use lazy loading in your application.

See this example

Let me know if you have any question.

So you are looking for an infinite scrolling, as far as I understand.

You have some plugins that may help you:

http://jscroll.com/

http://infinite-scroll.com

近期文章

  • 如果包含数字0到9和字符a到z,我该如何检查变量? [重复]
  • 在非常长的文本中仅保留前1000个单词[重复]
  • 如何为PHP添加UTF-8支持? [关闭]
  • 在Echo中使用str_replace()[关闭]
  • too long
  • 如何使用户名显示蓝色[关闭]
  • 接口与摘要差异的理论解释[关闭]
  • 函数里面的样式里面回声函数
  • 在会话超时和浏览器关闭的情况下记录用户的注销时间[重复]
  • 我如何用php获取var中的对象
  • 解析json_decoded php数组的最佳方法
  • 以分钟为单位的Unix时差会产生意外结果
  • PHP数组找到两个数字是一个接一个
  • SQL:选择与另一个表中的内容匹配的所有行
  • 连接成功运行时,mysqli和pdo返回0
  • PHP将数组值转换为键
  • PHP检查文件是否存在于任何目录中
  • 如何在php中合并两个mysql结果?
  • 在CentOS7上将PHP从5.5.7更新到7.
  • 在不添加周末的情况下获得数月的日子

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华