zoukankan      html  css  js  c++  java
  • 4基本动画

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style type="text/css">
            div {
                border: 1px solid #000;
                padding: 5px;
                margin: 2px;
                 100px;
                position: absolute;
                display: none;
                background-color: white;
            }
    
            body {
                border: 2px dashed;
            }
    
            img {
                position: absolute;
            }
        </style>
        <title></title>
        <script src="Scripts/jquery-1.8.2.min.js"></script>
        <script type="text/javascript">
    
            $(function () {
                $("#btnHid").click(function () {
    
                   // $("ul").hide(1000);//设置动画的执行时间 内置fast=200  normal=400 slow=600
    
                    //2.设置回调函数
                    //$("ul").hide(1000, function () {
                    //    $(this).show(3000);
                    //});
                    
                    //3递归
                    showHide();
                });
            });
            var times = 0;
            //用递归实现掩藏 显示
            function showHide()
            {
                if (times < 3)
                {
                    $("ul").toggle(3000, showHide);
                    times++;
                }
               
            }
        </script>
    </head>
    <body>
        <input type="button" value="测试" id="btnHid" />
        <ul>
            <li content="广州小蛮腰1">广州小蛮腰1</li>
            <li content="广州小蛮腰2">广州小蛮腰2</li>
            <li content="广州小蛮腰3">广州小蛮腰3</li>
            <li content="广州小蛮腰4">广州小蛮腰4</li>
            <li content="广州小蛮腰5">广州小蛮腰5</li>
        </ul>
    </body>
    </html>
    

      

  • 相关阅读:
    NSRunloop-基本概念
    GCD—NSThread-多线程的基本用法
    NSURLConnection-网络访问(同步异步)
    ASIHttpRequest网络使用框架
    XML与JSON解析
    iOS 设置系统音量和监听系统音量变化
    iOS_字典数组 按key分组和排序
    iOS 自定义字体设置
    日期选择和输入弹框
    iOS 耳机线控
  • 原文地址:https://www.cnblogs.com/sumg/p/3787785.html
Copyright © 2011-2022 走看看