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();
            });

  • 相关阅读:
    苹果新政,禁止开发者在App中加入检查更新功能
    Xcode 的正确打开方式——Debugging(转)
    AlertView + Block 的使用
    iOS 中Window优先级的问题
    iOS加载启动图的时候隐藏statusbar + 指定启动图显示多少秒
    eclispe+axis2+webservice入门
    Eclispe远程调试tomcat设置
    华为入职培训小计
    Java面试题总结 from Baidu 网易 阿里
    使用MyEclipse 9.0 创建 struts2 的HelloWorld 工程
  • 原文地址:https://www.cnblogs.com/wangtiantian/p/4998490.html
Copyright © 2011-2022 走看看