最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery實(shí)現(xiàn)動(dòng)畫效果的實(shí)例代碼

 更新時(shí)間:2013年05月07日 10:37:10   作者:  
jQuery實(shí)現(xiàn)動(dòng)畫效果的實(shí)例代碼,需要的朋友可以參考一下

復(fù)制代碼 代碼如下:

    <style type="text/css">
       table{border:1px solid #666;}
       table td{border:1px solid #eee;width:200px;height:200px;}
       img{width:200px;height:200px;border:none;position:relative;}
    </style>


    <script src="jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //            $('img').click(function () {
            //                $('img').animate({ left: '-=200px' }, 2000).animate({ left: '-=200px' }, 2000)
            //                .animate({ left: '+=400px', top: '-=200px' }, 1).animate({ left: '-=200px' }, 2000).animate({ left: '-=200px' }, 2000)
            //                .animate({ left: '+=400px', top: '-=200px' }, 1).animate({ left: '-=200x' }, 2000).animate({ left: '-=200px' }, 2000)
            //            })
            var i = 0; var c = 0;
            $('img').click(function () {
                if (c < 3) {
                    if (i == 2 & c == 0) { $('img').animate({ left: '+=400px', top: '-=200px' }, 1); c++ }
                    else if (i == 2 & c == 1) { $('img').animate({ left: '-=200px' }, 2000); c++ }
                    else if (i == 2 & c == 2) { $('img').animate({ left: '-=200px' }, 2000); c = 0; i++; }


                    else if (i == 3 & c == 0) { $('img').animate({ left: '+=400px', top: '-=200px' }, 1); c++ }
                    else if (i == 3 & c == 1) { $('img').animate({ left: '-=200px' }, 2000); c++ }
                    else if (i == 3 & c == 2) { $('img').animate({ left: '-=200px' }, 2000); c++; }
                    else { $('img').animate({ left: '-=200px' }, 2000); i++; }
                }
            })
        })
    </script>

</head>
<body>
   <table cellpadding="0" cellspacing="0">
      <tr>
        <td> </td> <td></td> <td></td>
      </tr>


       <tr>
        <td></td> <td></td> <td></td>
      </tr>

       <tr>
        <td></td> <td></td> <td><img src="images/2.gif" alt="奔跑的小人" /></td>
      </tr>
   </table>
</body>
</html>

相關(guān)文章

最新評(píng)論

枞阳县| 惠东县| 元朗区| 乌鲁木齐县| 囊谦县| 伊川县| 禹州市| 罗平县| 五常市| 新乐市| 固原市| 海丰县| 柏乡县| 中宁县| 西华县| 临沂市| 司法| 叙永县| 玉田县| 武川县| 新龙县| 华蓥市| 清水县| 星座| 巴彦县| 遂昌县| 台东县| 安阳市| 永康市| 顺平县| 毕节市| 盖州市| 嘉兴市| 兴海县| 上蔡县| 乌海市| 清镇市| 商城县| 岐山县| 岳普湖县| 新晃|