zoukankan      html  css  js  c++  java
  • 延时加载lazyload

    引入js

    <script src="jquery.1.6.4.js" type="text/javascript"></script>

    <script src="loadlazy.js" type="text/javascript"></script>

    <script type="text/javascript"> 

     $(document).ready(function(){

        $("img").lazyload({

            placeholder : "http://www.580zhao.com/template/shop/images/clear.gif",

            effect : "fadeIn"

        });

    })

    <div class="warp">

    <div><img src="http://img03.taobaocdn.com/tps/i3/T1eVX9Xh8AXXXXXXXX-120-160.jpg" alt=”独立” height="201"></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1IkOlXdtKXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img03.taobaocdn.com/tps/i3/T10JumXmtTXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1WBKhXa0bXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1nGF9Xh8vXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://img03.taobaocdn.com/tps/i3/T1eVX9Xh8AXXXXXXXX-120-160.jpg" alt=”独立” height="201"></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1IkOlXdtKXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img03.taobaocdn.com/tps/i3/T10JumXmtTXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1WBKhXa0bXXXXXXXX-120-160.jpg" alt=”独立”></div>

    <div><img src="http://www.7gege.com/upload/image/201109/132d22546a2944b5994bdd27bc26840d.jpg" alt=”独立”></div>

    <div><img src="http://img01.taobaocdn.com/tps/i1/T1nGF9Xh8vXXXXXXXX-120-160.jpg" alt=”独立”></div>

     </div>

  • 相关阅读:
    tuple 元组及字典dict
    day 49 css属性补充浮动 属性定位 抽屉作业
    day48 选择器(基本、层级 、属性) css属性
    day47 列表 表单 css初识
    day 46 http和html
    day 45索引
    day 44 练习题讲解 多表查询
    day 40 多表查询 子查询
    day39 表之间的关联关系、 补充 表操作总结 where 、group by、
    day38 数据类型 约束条件
  • 原文地址:https://www.cnblogs.com/jinbiao/p/2183296.html
Copyright © 2011-2022 走看看