当前位置:编程学习 > JAVA >>

animate用法

点击“滚开”,就会很明显的看到animate用法

 


<head>

    <title></title>
    <style type="text/css">
    .spanclass{ position:relative; background:#ffdddd}
    .class1
    {
        background:#BCC7D8;
        }
    </style>
    <script src="jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('span:first').click(function () {
                $('span:eq(1)').animate({ left: '+=100px' }, 2000);
            })
        })
    </script>
</head>
<body>
<span class="class1">滚开</span><span class="spanclass">滚就滚</span>
</body>

补充:web前端 , JavaScript ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,