Home > php教程 > php手册 > body text

Jquery图片预加载 实例代码

WBOY
Release: 2016-06-07 11:40:33
Original
1114 people have browsed it

Jquery图片预加载 实例代码
使用预加截,可提高用户浏览性,在打开页面时会非常流利,
因为当页面完全显示后,图片并没有加载,src里只有一张预加载图片,
等页面完全显示后,再利用js读取图片资源,当你图片没有下翻显示在屏幕时,
依然不会加载,当你下翻看到图片时,js才会进行读取,还可以省流量!
效果演示 http://www.qq839.com
送上代码 交流QQ839024615<!--Js代码--><br> <script></script><br> <script></script><br> <script><br /> $(function () {<br /> $("img").lazyload({<br /> effect: "fadeIn"<br /> });<br /> });<br /> </script><br> <!--Html代码--><br> <img alt="Jquery图片预加载 实例代码" >

AD:真正免费,域名+虚机+企业邮箱=0元

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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template