最新国产好看的视频,伊人天堂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)論

普格县| 多伦县| 宜阳县| 米易县| 尉犁县| 丰县| 青州市| 额尔古纳市| 正宁县| 凌海市| 巴楚县| 田东县| 丰县| 休宁县| 浑源县| 凭祥市| 华蓥市| 博客| 钟祥市| 湖北省| 梅州市| 项城市| 建水县| 日土县| 冷水江市| 离岛区| 金昌市| 兴仁县| 禹城市| 莱芜市| 淮安市| 垣曲县| 永昌县| 茌平县| 基隆市| 夏邑县| 丰台区| 莒南县| 聂荣县| 天镇县| 都昌县|