Html
    Css
    Js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$(function() {
$("#butbegin").click(function() {
//
$("#neendiv").animate({
left: "1000px"
}, 1000, function() {
$(this).css("background", "#abcdff");
});
//
$("#neendiv").animate({
top: "300px",
width: "150px",
height: "150px"
});
//
$("#neendiv").animate({
left: "100px"
});
//
$("#neendiv").animate({
"border-radius": "50%"
});
//
$("#neendiv").animate({
top: "100px"
});
//
$("#neendiv").animate({
width: "100px"
});
$("#neendiv").animate({
height: "100px"
});
//
$("#neendiv").animate({
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.9.1
 立即下载

动画 | 自定义动画

默认情况下,所有 HTML 元素的位置都是静态的,并且无法移动。如需对位置进行操作,记得首先把元素的 CSS position 属性设置为 relative、fixed 或 absolute。

0