-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcss5-step.html
32 lines (32 loc) · 1.11 KB
/
css5-step.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.charector {
position: absolute;
width: 180px;
height: 300px;
background: url(https://github.com/SIPC115/Poplar/blob/master/image/charector.png?raw=true) 0 0 no-repeat;
animation-name: charector-1;
animation-iteration-count: infinite;/* 动画无限播放 */
animation-timing-function: step-start;/* 马上跳到动画每一结束桢的状态 */
animation-duration: 950ms;/* 动画运行的时间 */
}
@keyframes charector-1{
0% {background-position: 0 0;}
14.3% {background-position: -180px 0;}
28.6% {background-position: -360px 0;}
42.9% {background-position: -540px 0;}
57.2% {background-position: -720px 0;}
71.5% {background-position: -900px 0;}
85.8% {background-position: -1080px 0;}
100% {background-position: 0 0;}
}
</style>
</head>
<body>
<div class="charector"></div>
</body>
</html>