x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<style>
6
#myDIV {
7
width: 300px;
8
height: 200px;
9
border: 1px solid black;
10
animation: mymove 5s infinite;
11
/* Chrome, Safari, Opera */
12
animation: mymove 5s infinite;
13
}
14
/* Chrome, Safari, Opera */
15
16
@-webkit-keyframes mymove {
17
50% {
18
border-bottom-width: 50px;
19
}
20
}
21
/* Standard syntax */
22
23
@keyframes mymove {
24
50% {
25
border-bottom-width: 50px;
26
}
27
}
28
</style>
29
</head>
30
<body>
31
32
<p>逐步改变 border-bottom-width 属性(从 0 到 50px):
33
<p>
34
<div id="myDIV"></div>
35
36
<p>border-bottom-width 属性支持动画效果。</p>
37
<p><b>注意:</b>Internet Explorer 9 及更早 IE 版本不支持 CSS 动画。</p>
38
39
</body>
40
</html>