duanluanlang8501 2011-07-20 21:33
浏览 52

Php Jquery Javascript预加载图片

Simple question.

If I loop through PHP and create several images set to display:none and then use Jquery to access their visibility, does this increase page load time and such as if the images were actually displayed on the page?

If so, is there a simple way to load images dynamically, say if a user selects and option and another image gallery appears but the page does not refresh (ajax?)

Thanks!

  • 写回答

2条回答

  • dongshen9686 2011-07-20 21:34
    关注

    Nope. This will actually take longer since you have to set display:none and then show them with jQuery than if you just showed them as they were downloaded.

    In the second part of your question I think you're referring to lazy loading, where the images are loaded on demand from the user, instead of all up front.

    评论

报告相同问题?

悬赏问题

  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。