zoukankan      html  css  js  c++  java
  • layload

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <style type="text/css">
    div{margin-bottom: 350px;}
    </style>
    <script src="jquery-1.10.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
    $(function () {
        
        $(window).scroll(function () {
            $('img').each(function (i,elem) {
                if ($(elem).offset().top<$(window).height()+$(document).scrollTop()) {
    
                    $(elem).attr('src',$(elem).attr('_src'));
                }
            })
        });
        
    })    
    </script>
    </head>
    <body>
        <div><img _src="img/miaov (5).jpg" alt="" /></div>
        <div><img _src="img/miaov (15).jpg" alt="" /></div>
        <div><img _src="img/miaov (25).jpg" alt="" /></div>
        <div><img _src="img/miaov (35).jpg" alt="" /></div>
        <div><img _src="img/miaov (45).jpg" alt="" /></div>
        <div><img _src="img/miaov (55).jpg" alt="" /></div>
    </body>
    </html>
  • 相关阅读:
    最近工作
    有点感受
    日子有点快
    IDEA配置spring
    IDEA配置hibernate
    mysql插入中文乱码
    深夜配置一把struts2
    IDEA 配置SSH2
    找工作的事情
    YTU 2509: 奇怪的分式
  • 原文地址:https://www.cnblogs.com/masita/p/4574069.html
Copyright © 2011-2022 走看看