• animate动画


    <!DOCTYPE html>
    <html>

    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title></title>
        <style>
        .left div,
        .right div {
            100px;
            height: 50px;
            padding: 5px;
            margin: 5px;
            float: left;
            border: 1px solid #ccc;
        
        }
        .left div {
            background: #bbffaa;
        }
       
        .right div {
            background: yellow;
        }
        </style>
        <script src="https://lib.sinaapp.com/js/jquery/1.9.1/jquery-

    1.9.1.min.js"></script>
    </head>

    <body>
        <h2>slideDown</h2>
        <div class="left">
            <h4>测试一</h4>
            <div class="a" id="a1">hide-show</div>
          <select id="cs" >
           <option value="1">向下</option>
            <option value="2">向右</option>
            <option value="3">淡出</option>
            <option value="4">淡入</option>
          </select>
         <button class="qd">确定</button>
        </div>
        <div class="right">
            <h4>测试二</h4>
            <div class="b" id="a2">hide-show</div>
            <button>点击slideDown执行回调</button>
        </div>
            <script type="text/javascript">
              $(".qd").click(function(){
                 var v =$("#cs").val()
                 if(v == "1"){$(".a").animate({height:300},3000)}
                 else if(v == "2"){$(".a").animate({500},3000)}
                 else if(v == "3"){$(".a").animate({opacity:0.2},3000)}
                 else if(v == "4"){$(".a").animate({opacity:1},3000)}
              })
             
            
            </script>
    </body>


    </html>

    红尘往事,一切随风!
  • 相关阅读:
    java 连接SQL Server
    JAVA泛型
    JAVA 数组遍历
    JAVA注释
    Python正则表达式
    python练习题二
    Python函数
    Python练习题一
    重学python-列表的一些操作
    重学python-python-pandas库
  • 原文地址:https://www.cnblogs.com/xwenwu/p/13629992.html
Copyright © 2020-2023  润新知