zoukankan      html  css  js  c++  java
  • div定时放大缩小

    <!DOCTYPE html>
    <html>
    <head>
    <style> 
    .anim{
        width: 100px;
        height: 100px;
        background-color: red;
    }
    .anim-show
    {
        transition: 0.7s;
        transform:translate(100px,100px) scale(1.5);
    }
    .anim-show1
    {
        transition: 0.7s;
        transform:translate(100px,100px) scale(1);
    }
    
    </style>
    </head>
    <body>
        <div id="a" class="anim anim-show1"></div>
        
        <script src="http://www.jq22.com/jquery/2.1.1/jquery.min.js"></script>
        <script>
    
    
            var i = 0;
    
            var int=self.setInterval("clock()",700);
            
            function clock(){
                i++;
    
                if(parseInt(i/2) == i/2){
                    $("#a").addClass("anim-show");
                    $("#a").removeClass("anim-show1");
                }else{
                    $("#a").removeClass("anim-show");
                    $("#a").addClass("anim-show1");
                }
            }
        </script>
    </body>
    </html>
  • 相关阅读:
    第九周作业
    第八周
    第七周
    Jmeter连接到Mysql
    数据库常用链接URL写法
    功能测试方法
    常建输入框的测试
    系统业务流程测试(转)
    Linux
    搭建Git服务器
  • 原文地址:https://www.cnblogs.com/junyi-bk/p/11328114.html
Copyright © 2011-2022 走看看