zoukankan      html  css  js  c++  java
  • jquery-animate基本用法


    //点击DIV移动

    function btnMoveClick() {
        $("#div1").stop(true, true);
        var vleft = $("#div1").position().left;
        var vtop = $("#div1").position().top;
        var vwidth = $("#div1").width;
        var vheight = $("#div1").height;
        $("#div1").animate({ "top": "25px", "left": "200px", "height": "20px", "width": "20px", "border-radius": "10px" }, 2000, function () {
            $("#div1").animate({ "top": "25px", "left": "0px" }, 2000, function () {
                $("#div1").animate({ "top": "50px", "left": "400px", "height": "50px", "width": "50px", "border-radius": "0px" }, 2000, function () {
                    $("#div1").css({
                        "top": vtop,
                        "left": vleft,
                        "height": vheight,
                        "width": vwidth
                    })
                });
            })
        });


        //$(this).animate({ "top": "200px", "left": "200px" }, 2000, function () {
        //    $(this).animate({ "top": "0px", "left": "400px" }, 2000);
        //});
    }

  • 相关阅读:
    Ajax传值以及接受传值,@ResPonseBody 和 @RequestBody
    分页
    延迟加载
    mybatis的一级缓存和二级缓存
    拦截器的使用
    Session和Cookie
    逆向工程
    springmvc注解详解
    Java——变量
    Go通关04:正确使用 array、slice 和 map!
  • 原文地址:https://www.cnblogs.com/cxd1008/p/6372441.html
Copyright © 2011-2022 走看看