zoukankan      html  css  js  c++  java
  • jQuery 开始动画,停止动画

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>效果2</title>
        <script src="js/jquery-1.7.1.min.js"></script>
    </head>
    <style>
        .fff{
            background: #fff;
            border: 1px solid #000;
        }
        .head{line-height: 30px;background: #999;}
        .arrow{ 20px;height: 20px;background: red;display: block;float: right;}
        .div1{
             100%;
            height: 50px;
            background: red;
        }
        .ani-1{
             50px;
            height: 50px;
            background: red;
        }
    </style>
    <script>
        $(document).ready(function(){
         $(".arrow").click(function(){
            $("#div1").slideToggle();
        });
    
         $("#go").click(function(){
             $("#anA").animate({
                 "400px",
                 height:"400px",
                 fontSize:"18px",
                 marginLeft:"30px"    
             },5000)
         })
          $("#sttop").click(function(){
             $("#anA").stop()
         })
    
          jQuery.fx.interval = 100;
    
    $("input").click(function(){
      $("div").toggle( 3000 );
    });
    
    
    });
    </script>
    <body>
        <div class="head">我是大标题  <a class="arrow" onclick="btn_click()"></a></div>
    
    <div id="div1" class="div1"></div>
    
    <button id="go">开始动画</button> <button id="sttop">停止动画</button>
    
    <div class="ani-1" id="anA">哈哈哈,你来打我啊</div>
    <p><input type="button" value="Run"/></p>
    <div></div>
    
    </body>
    </html>

  • 相关阅读:
    HDU 2842 (递推+矩阵快速幂)
    HDU 2838 (DP+树状数组维护带权排序)
    HDU 2836 (离散化DP+区间优化)
    HDU 2831 (贪心)
    HDU 2818 (矢量并查集)
    HDU 2822 (BFS+优先队列)
    HDU 3090 (贪心)
    HDU 3089 (快速约瑟夫环)
    XCOJ 1103 (LCA+树链最大子段和)
    HDU 3078 (LCA+树链第K大)
  • 原文地址:https://www.cnblogs.com/arealy/p/7738008.html
Copyright © 2011-2022 走看看