实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
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
animation-timing-function:linear;
13
14
/* Safari and Chrome */
15
-webkit-animation:mymove 5s infinite;
16
-webkit-animation-timing-function:linear;
17
}
18
19
@keyframes mymove
20
{
21
from {left:0px;}
22
to {left:200px;}
23
}
24
25
@-webkit-keyframes mymove /* Safari and Chrome */
26
{
27
from {left:0px;}
28
to {left:200px;}
29
}
30
</style>
31
</head>
32
<body>
33
34
<p><strong>Note:</strong> The animation-timing-function property is not supported in Internet Explorer 9 and earlier versions.</p>
35
36
<div></div>
37
38
</body>
39
</html>
40