案例:CSS3 案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style> 
5
div
6
{
7
width:100px;
8
height:100px;
9
background:red;
10
position:relative;
11
animation:mymove 5s infinite;
12
-moz-animation:mymove 5s infinite; /* Firefox */
13
-webkit-animation:mymove 5s infinite; /* Safari and Chrome */
14
-o-animation:mymove 5s infinite; /* Opera */
15
}
16
17
@keyframes mymove
18
{
19
0%   {top:0px;}
20
25%  {top:200px;}
21
75%  {top:50px}
22
100% {top:100px;}
23
}
24

 运行结果 
 北美留学生论坛