Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
24 lines (24 loc) · 641 Bytes

File metadata and controls

24 lines (24 loc) · 641 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>向右移动后再向左移动回来</title>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div style="position:relative;width:24px;height: 32px;border: 1px solid red;"></div>
<button type="button">向右</button>
<script type="text/javascript">
$('button').bind('click',function(){
$('div').animate({
left:'+=100px'
//添加第三个参数的回调函数 位置相对左边界
},3000,function(){
$('div').animate({
left:'-=100px'
},3000)
});
});
</script>
</body>
</html>
Morty Proxy This is a proxified and sanitized view of the page, visit original site.