zoukankan      html  css  js  c++  java
  • jquery实现的动画上下闪动

            function shantuhanshu() {
                $("#shantu").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu").animate({ "top": "+=4px", "opacity": "1" }, 500);
                $("#shantu").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu").animate({ "top": "+=4px", "opacity": "1" }, 500);
            };
            function shantuhanshuyi() {
                $("#shantu1").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu1").animate({ "top": "+=4px", "opacity": "1" }, 500);
                $("#shantu1").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu1").animate({ "top": "+=4px", "opacity": "1" }, 500);
            }
            function shantuhanshuer() {
                $("#shantu2").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu2").animate({ "top": "+=4px", "opacity": "1" }, 500);
                $("#shantu2").animate({ "top": "-=4px", "opacity": "1" }, 500);
                $("#shantu2").animate({ "top": "+=4px", "opacity": "1" }, 500);
            }

            //多少时间后执行一次
            function setInterval1() {
                setTimeout("shantuhanshu()", 3000);
            }
            function setInterval2() {
                setTimeout("shantuhanshuyi()", 6000);
            }
            function setInterval3() {
                setTimeout("shantuhanshuer()", 9000);
            }
            function setInterval123() {
                setInterval1();
                setInterval2();
                setInterval3();
            }

            //多少秒之后反复执行
            $(function () {

                setInterval(function () {
                    setInterval123();
                }, 9000);
                //movewenzi();
            });

  • 相关阅读:
    POJ:2431-Expedition
    poj:3253-Fence Repair
    POJ:3617-Best Cow Line(贪心)
    IOS各种传值方式
    imageDownloader
    Android放大镜的实现
    Delphi 串口通信(1)
    UVA 10131
    Skew Join与Left Semi Join相关
    Android动画 fillAfter和fillBefore
  • 原文地址:https://www.cnblogs.com/wangtiantian/p/4998490.html
Copyright © 2011-2022 走看看